"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MsgClientImpl = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _m0 = _interopRequireWildcard(require("protobufjs/minimal"));
var _tx = require("./tx");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
//@ts-nocheck
/** Msg defines the identity Msg service. */
var MsgClientImpl = exports.MsgClientImpl = /*#__PURE__*/function () {
  function MsgClientImpl(rpc) {
    (0, _classCallCheck2["default"])(this, MsgClientImpl);
    (0, _defineProperty2["default"])(this, "rpc", void 0);
    this.rpc = rpc;
    this.createIidDocument = this.createIidDocument.bind(this);
    this.updateIidDocument = this.updateIidDocument.bind(this);
    this.addVerification = this.addVerification.bind(this);
    this.revokeVerification = this.revokeVerification.bind(this);
    this.setVerificationRelationships = this.setVerificationRelationships.bind(this);
    this.addService = this.addService.bind(this);
    this.deleteService = this.deleteService.bind(this);
    this.addController = this.addController.bind(this);
    this.deleteController = this.deleteController.bind(this);
    this.addLinkedResource = this.addLinkedResource.bind(this);
    this.deleteLinkedResource = this.deleteLinkedResource.bind(this);
    this.addLinkedClaim = this.addLinkedClaim.bind(this);
    this.deleteLinkedClaim = this.deleteLinkedClaim.bind(this);
    this.addLinkedEntity = this.addLinkedEntity.bind(this);
    this.deleteLinkedEntity = this.deleteLinkedEntity.bind(this);
    this.addAccordedRight = this.addAccordedRight.bind(this);
    this.deleteAccordedRight = this.deleteAccordedRight.bind(this);
    this.addIidContext = this.addIidContext.bind(this);
    this.deactivateIID = this.deactivateIID.bind(this);
    this.deleteIidContext = this.deleteIidContext.bind(this);
  }
  return (0, _createClass2["default"])(MsgClientImpl, [{
    key: "createIidDocument",
    value: function createIidDocument(request) {
      var data = _tx.MsgCreateIidDocument.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "CreateIidDocument", data);
      return promise.then(function (data) {
        return _tx.MsgCreateIidDocumentResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "updateIidDocument",
    value: function updateIidDocument(request) {
      var data = _tx.MsgUpdateIidDocument.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "UpdateIidDocument", data);
      return promise.then(function (data) {
        return _tx.MsgUpdateIidDocumentResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "addVerification",
    value: function addVerification(request) {
      var data = _tx.MsgAddVerification.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "AddVerification", data);
      return promise.then(function (data) {
        return _tx.MsgAddVerificationResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "revokeVerification",
    value: function revokeVerification(request) {
      var data = _tx.MsgRevokeVerification.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "RevokeVerification", data);
      return promise.then(function (data) {
        return _tx.MsgRevokeVerificationResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "setVerificationRelationships",
    value: function setVerificationRelationships(request) {
      var data = _tx.MsgSetVerificationRelationships.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "SetVerificationRelationships", data);
      return promise.then(function (data) {
        return _tx.MsgSetVerificationRelationshipsResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "addService",
    value: function addService(request) {
      var data = _tx.MsgAddService.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "AddService", data);
      return promise.then(function (data) {
        return _tx.MsgAddServiceResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "deleteService",
    value: function deleteService(request) {
      var data = _tx.MsgDeleteService.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "DeleteService", data);
      return promise.then(function (data) {
        return _tx.MsgDeleteServiceResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "addController",
    value: function addController(request) {
      var data = _tx.MsgAddController.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "AddController", data);
      return promise.then(function (data) {
        return _tx.MsgAddControllerResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "deleteController",
    value: function deleteController(request) {
      var data = _tx.MsgDeleteController.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "DeleteController", data);
      return promise.then(function (data) {
        return _tx.MsgDeleteControllerResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "addLinkedResource",
    value: function addLinkedResource(request) {
      var data = _tx.MsgAddLinkedResource.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "AddLinkedResource", data);
      return promise.then(function (data) {
        return _tx.MsgAddLinkedResourceResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "deleteLinkedResource",
    value: function deleteLinkedResource(request) {
      var data = _tx.MsgDeleteLinkedResource.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "DeleteLinkedResource", data);
      return promise.then(function (data) {
        return _tx.MsgDeleteLinkedResourceResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "addLinkedClaim",
    value: function addLinkedClaim(request) {
      var data = _tx.MsgAddLinkedClaim.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "AddLinkedClaim", data);
      return promise.then(function (data) {
        return _tx.MsgAddLinkedClaimResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "deleteLinkedClaim",
    value: function deleteLinkedClaim(request) {
      var data = _tx.MsgDeleteLinkedClaim.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "DeleteLinkedClaim", data);
      return promise.then(function (data) {
        return _tx.MsgDeleteLinkedClaimResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "addLinkedEntity",
    value: function addLinkedEntity(request) {
      var data = _tx.MsgAddLinkedEntity.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "AddLinkedEntity", data);
      return promise.then(function (data) {
        return _tx.MsgAddLinkedEntityResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "deleteLinkedEntity",
    value: function deleteLinkedEntity(request) {
      var data = _tx.MsgDeleteLinkedEntity.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "DeleteLinkedEntity", data);
      return promise.then(function (data) {
        return _tx.MsgDeleteLinkedEntityResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "addAccordedRight",
    value: function addAccordedRight(request) {
      var data = _tx.MsgAddAccordedRight.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "AddAccordedRight", data);
      return promise.then(function (data) {
        return _tx.MsgAddAccordedRightResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "deleteAccordedRight",
    value: function deleteAccordedRight(request) {
      var data = _tx.MsgDeleteAccordedRight.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "DeleteAccordedRight", data);
      return promise.then(function (data) {
        return _tx.MsgDeleteAccordedRightResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "addIidContext",
    value: function addIidContext(request) {
      var data = _tx.MsgAddIidContext.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "AddIidContext", data);
      return promise.then(function (data) {
        return _tx.MsgAddIidContextResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "deactivateIID",
    value: function deactivateIID(request) {
      var data = _tx.MsgDeactivateIID.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "DeactivateIID", data);
      return promise.then(function (data) {
        return _tx.MsgDeactivateIIDResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "deleteIidContext",
    value: function deleteIidContext(request) {
      var data = _tx.MsgDeleteIidContext.encode(request).finish();
      var promise = this.rpc.request("ixo.iid.v1beta1.Msg", "DeleteIidContext", data);
      return promise.then(function (data) {
        return _tx.MsgDeleteIidContextResponse.decode(new _m0.Reader(data));
      });
    }
  }]);
}();