//@ts-nocheck
import { Context, Service, AccordedRight, LinkedResource, LinkedEntity, LinkedClaim, VerificationMethod } from "./types";
import * as _m0 from "protobufjs/minimal";
import { isSet } from "../../../helpers";
/**
 * Verification is a message that allows to assign a verification method
 * to one or more verification relationships
 */

/**
 * Verification is a message that allows to assign a verification method
 * to one or more verification relationships
 */

/** MsgCreateDidDocument defines a SDK message for creating a new did. */

/** MsgCreateDidDocument defines a SDK message for creating a new did. */

/**
 * Updates the entity with all the fields, so if field empty will be updated
 * with default go type, aka never null
 */

/**
 * Updates the entity with all the fields, so if field empty will be updated
 * with default go type, aka never null
 */

function createBaseVerification() {
  return {
    relationships: [],
    method: undefined,
    context: []
  };
}
export const Verification = {
  encode(message, writer = _m0.Writer.create()) {
    for (const v of message.relationships) {
      writer.uint32(10).string(v);
    }
    if (message.method !== undefined) {
      VerificationMethod.encode(message.method, writer.uint32(18).fork()).ldelim();
    }
    for (const v of message.context) {
      writer.uint32(26).string(v);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseVerification();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.relationships.push(reader.string());
          break;
        case 2:
          message.method = VerificationMethod.decode(reader, reader.uint32());
          break;
        case 3:
          message.context.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      relationships: Array.isArray(object === null || object === void 0 ? void 0 : object.relationships) ? object.relationships.map(e => String(e)) : [],
      method: isSet(object.method) ? VerificationMethod.fromJSON(object.method) : undefined,
      context: Array.isArray(object === null || object === void 0 ? void 0 : object.context) ? object.context.map(e => String(e)) : []
    };
  },
  toJSON(message) {
    const obj = {};
    if (message.relationships) {
      obj.relationships = message.relationships.map(e => e);
    } else {
      obj.relationships = [];
    }
    message.method !== undefined && (obj.method = message.method ? VerificationMethod.toJSON(message.method) : undefined);
    if (message.context) {
      obj.context = message.context.map(e => e);
    } else {
      obj.context = [];
    }
    return obj;
  },
  fromPartial(object) {
    var _object$relationships, _object$context;
    const message = createBaseVerification();
    message.relationships = ((_object$relationships = object.relationships) === null || _object$relationships === void 0 ? void 0 : _object$relationships.map(e => e)) || [];
    message.method = object.method !== undefined && object.method !== null ? VerificationMethod.fromPartial(object.method) : undefined;
    message.context = ((_object$context = object.context) === null || _object$context === void 0 ? void 0 : _object$context.map(e => e)) || [];
    return message;
  }
};
function createBaseMsgCreateIidDocument() {
  return {
    id: "",
    controllers: [],
    context: [],
    verifications: [],
    services: [],
    accordedRight: [],
    linkedResource: [],
    linkedEntity: [],
    alsoKnownAs: "",
    signer: "",
    linkedClaim: []
  };
}
export const MsgCreateIidDocument = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    for (const v of message.controllers) {
      writer.uint32(18).string(v);
    }
    for (const v of message.context) {
      Context.encode(v, writer.uint32(26).fork()).ldelim();
    }
    for (const v of message.verifications) {
      Verification.encode(v, writer.uint32(34).fork()).ldelim();
    }
    for (const v of message.services) {
      Service.encode(v, writer.uint32(42).fork()).ldelim();
    }
    for (const v of message.accordedRight) {
      AccordedRight.encode(v, writer.uint32(50).fork()).ldelim();
    }
    for (const v of message.linkedResource) {
      LinkedResource.encode(v, writer.uint32(58).fork()).ldelim();
    }
    for (const v of message.linkedEntity) {
      LinkedEntity.encode(v, writer.uint32(66).fork()).ldelim();
    }
    if (message.alsoKnownAs !== "") {
      writer.uint32(74).string(message.alsoKnownAs);
    }
    if (message.signer !== "") {
      writer.uint32(82).string(message.signer);
    }
    for (const v of message.linkedClaim) {
      LinkedClaim.encode(v, writer.uint32(90).fork()).ldelim();
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgCreateIidDocument();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.controllers.push(reader.string());
          break;
        case 3:
          message.context.push(Context.decode(reader, reader.uint32()));
          break;
        case 4:
          message.verifications.push(Verification.decode(reader, reader.uint32()));
          break;
        case 5:
          message.services.push(Service.decode(reader, reader.uint32()));
          break;
        case 6:
          message.accordedRight.push(AccordedRight.decode(reader, reader.uint32()));
          break;
        case 7:
          message.linkedResource.push(LinkedResource.decode(reader, reader.uint32()));
          break;
        case 8:
          message.linkedEntity.push(LinkedEntity.decode(reader, reader.uint32()));
          break;
        case 9:
          message.alsoKnownAs = reader.string();
          break;
        case 10:
          message.signer = reader.string();
          break;
        case 11:
          message.linkedClaim.push(LinkedClaim.decode(reader, reader.uint32()));
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      controllers: Array.isArray(object === null || object === void 0 ? void 0 : object.controllers) ? object.controllers.map(e => String(e)) : [],
      context: Array.isArray(object === null || object === void 0 ? void 0 : object.context) ? object.context.map(e => Context.fromJSON(e)) : [],
      verifications: Array.isArray(object === null || object === void 0 ? void 0 : object.verifications) ? object.verifications.map(e => Verification.fromJSON(e)) : [],
      services: Array.isArray(object === null || object === void 0 ? void 0 : object.services) ? object.services.map(e => Service.fromJSON(e)) : [],
      accordedRight: Array.isArray(object === null || object === void 0 ? void 0 : object.accordedRight) ? object.accordedRight.map(e => AccordedRight.fromJSON(e)) : [],
      linkedResource: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedResource) ? object.linkedResource.map(e => LinkedResource.fromJSON(e)) : [],
      linkedEntity: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedEntity) ? object.linkedEntity.map(e => LinkedEntity.fromJSON(e)) : [],
      alsoKnownAs: isSet(object.alsoKnownAs) ? String(object.alsoKnownAs) : "",
      signer: isSet(object.signer) ? String(object.signer) : "",
      linkedClaim: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedClaim) ? object.linkedClaim.map(e => LinkedClaim.fromJSON(e)) : []
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    if (message.controllers) {
      obj.controllers = message.controllers.map(e => e);
    } else {
      obj.controllers = [];
    }
    if (message.context) {
      obj.context = message.context.map(e => e ? Context.toJSON(e) : undefined);
    } else {
      obj.context = [];
    }
    if (message.verifications) {
      obj.verifications = message.verifications.map(e => e ? Verification.toJSON(e) : undefined);
    } else {
      obj.verifications = [];
    }
    if (message.services) {
      obj.services = message.services.map(e => e ? Service.toJSON(e) : undefined);
    } else {
      obj.services = [];
    }
    if (message.accordedRight) {
      obj.accordedRight = message.accordedRight.map(e => e ? AccordedRight.toJSON(e) : undefined);
    } else {
      obj.accordedRight = [];
    }
    if (message.linkedResource) {
      obj.linkedResource = message.linkedResource.map(e => e ? LinkedResource.toJSON(e) : undefined);
    } else {
      obj.linkedResource = [];
    }
    if (message.linkedEntity) {
      obj.linkedEntity = message.linkedEntity.map(e => e ? LinkedEntity.toJSON(e) : undefined);
    } else {
      obj.linkedEntity = [];
    }
    message.alsoKnownAs !== undefined && (obj.alsoKnownAs = message.alsoKnownAs);
    message.signer !== undefined && (obj.signer = message.signer);
    if (message.linkedClaim) {
      obj.linkedClaim = message.linkedClaim.map(e => e ? LinkedClaim.toJSON(e) : undefined);
    } else {
      obj.linkedClaim = [];
    }
    return obj;
  },
  fromPartial(object) {
    var _object$id, _object$controllers, _object$context2, _object$verifications, _object$services, _object$accordedRight, _object$linkedResourc, _object$linkedEntity, _object$alsoKnownAs, _object$signer, _object$linkedClaim;
    const message = createBaseMsgCreateIidDocument();
    message.id = (_object$id = object.id) !== null && _object$id !== void 0 ? _object$id : "";
    message.controllers = ((_object$controllers = object.controllers) === null || _object$controllers === void 0 ? void 0 : _object$controllers.map(e => e)) || [];
    message.context = ((_object$context2 = object.context) === null || _object$context2 === void 0 ? void 0 : _object$context2.map(e => Context.fromPartial(e))) || [];
    message.verifications = ((_object$verifications = object.verifications) === null || _object$verifications === void 0 ? void 0 : _object$verifications.map(e => Verification.fromPartial(e))) || [];
    message.services = ((_object$services = object.services) === null || _object$services === void 0 ? void 0 : _object$services.map(e => Service.fromPartial(e))) || [];
    message.accordedRight = ((_object$accordedRight = object.accordedRight) === null || _object$accordedRight === void 0 ? void 0 : _object$accordedRight.map(e => AccordedRight.fromPartial(e))) || [];
    message.linkedResource = ((_object$linkedResourc = object.linkedResource) === null || _object$linkedResourc === void 0 ? void 0 : _object$linkedResourc.map(e => LinkedResource.fromPartial(e))) || [];
    message.linkedEntity = ((_object$linkedEntity = object.linkedEntity) === null || _object$linkedEntity === void 0 ? void 0 : _object$linkedEntity.map(e => LinkedEntity.fromPartial(e))) || [];
    message.alsoKnownAs = (_object$alsoKnownAs = object.alsoKnownAs) !== null && _object$alsoKnownAs !== void 0 ? _object$alsoKnownAs : "";
    message.signer = (_object$signer = object.signer) !== null && _object$signer !== void 0 ? _object$signer : "";
    message.linkedClaim = ((_object$linkedClaim = object.linkedClaim) === null || _object$linkedClaim === void 0 ? void 0 : _object$linkedClaim.map(e => LinkedClaim.fromPartial(e))) || [];
    return message;
  }
};
function createBaseMsgCreateIidDocumentResponse() {
  return {};
}
export const MsgCreateIidDocumentResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgCreateIidDocumentResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgCreateIidDocumentResponse();
    return message;
  }
};
function createBaseMsgUpdateIidDocument() {
  return {
    id: "",
    controllers: [],
    context: [],
    verifications: [],
    services: [],
    accordedRight: [],
    linkedResource: [],
    linkedEntity: [],
    alsoKnownAs: "",
    signer: "",
    linkedClaim: []
  };
}
export const MsgUpdateIidDocument = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    for (const v of message.controllers) {
      writer.uint32(18).string(v);
    }
    for (const v of message.context) {
      Context.encode(v, writer.uint32(26).fork()).ldelim();
    }
    for (const v of message.verifications) {
      Verification.encode(v, writer.uint32(34).fork()).ldelim();
    }
    for (const v of message.services) {
      Service.encode(v, writer.uint32(42).fork()).ldelim();
    }
    for (const v of message.accordedRight) {
      AccordedRight.encode(v, writer.uint32(50).fork()).ldelim();
    }
    for (const v of message.linkedResource) {
      LinkedResource.encode(v, writer.uint32(58).fork()).ldelim();
    }
    for (const v of message.linkedEntity) {
      LinkedEntity.encode(v, writer.uint32(66).fork()).ldelim();
    }
    if (message.alsoKnownAs !== "") {
      writer.uint32(74).string(message.alsoKnownAs);
    }
    if (message.signer !== "") {
      writer.uint32(82).string(message.signer);
    }
    for (const v of message.linkedClaim) {
      LinkedClaim.encode(v, writer.uint32(90).fork()).ldelim();
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgUpdateIidDocument();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.controllers.push(reader.string());
          break;
        case 3:
          message.context.push(Context.decode(reader, reader.uint32()));
          break;
        case 4:
          message.verifications.push(Verification.decode(reader, reader.uint32()));
          break;
        case 5:
          message.services.push(Service.decode(reader, reader.uint32()));
          break;
        case 6:
          message.accordedRight.push(AccordedRight.decode(reader, reader.uint32()));
          break;
        case 7:
          message.linkedResource.push(LinkedResource.decode(reader, reader.uint32()));
          break;
        case 8:
          message.linkedEntity.push(LinkedEntity.decode(reader, reader.uint32()));
          break;
        case 9:
          message.alsoKnownAs = reader.string();
          break;
        case 10:
          message.signer = reader.string();
          break;
        case 11:
          message.linkedClaim.push(LinkedClaim.decode(reader, reader.uint32()));
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      controllers: Array.isArray(object === null || object === void 0 ? void 0 : object.controllers) ? object.controllers.map(e => String(e)) : [],
      context: Array.isArray(object === null || object === void 0 ? void 0 : object.context) ? object.context.map(e => Context.fromJSON(e)) : [],
      verifications: Array.isArray(object === null || object === void 0 ? void 0 : object.verifications) ? object.verifications.map(e => Verification.fromJSON(e)) : [],
      services: Array.isArray(object === null || object === void 0 ? void 0 : object.services) ? object.services.map(e => Service.fromJSON(e)) : [],
      accordedRight: Array.isArray(object === null || object === void 0 ? void 0 : object.accordedRight) ? object.accordedRight.map(e => AccordedRight.fromJSON(e)) : [],
      linkedResource: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedResource) ? object.linkedResource.map(e => LinkedResource.fromJSON(e)) : [],
      linkedEntity: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedEntity) ? object.linkedEntity.map(e => LinkedEntity.fromJSON(e)) : [],
      alsoKnownAs: isSet(object.alsoKnownAs) ? String(object.alsoKnownAs) : "",
      signer: isSet(object.signer) ? String(object.signer) : "",
      linkedClaim: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedClaim) ? object.linkedClaim.map(e => LinkedClaim.fromJSON(e)) : []
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    if (message.controllers) {
      obj.controllers = message.controllers.map(e => e);
    } else {
      obj.controllers = [];
    }
    if (message.context) {
      obj.context = message.context.map(e => e ? Context.toJSON(e) : undefined);
    } else {
      obj.context = [];
    }
    if (message.verifications) {
      obj.verifications = message.verifications.map(e => e ? Verification.toJSON(e) : undefined);
    } else {
      obj.verifications = [];
    }
    if (message.services) {
      obj.services = message.services.map(e => e ? Service.toJSON(e) : undefined);
    } else {
      obj.services = [];
    }
    if (message.accordedRight) {
      obj.accordedRight = message.accordedRight.map(e => e ? AccordedRight.toJSON(e) : undefined);
    } else {
      obj.accordedRight = [];
    }
    if (message.linkedResource) {
      obj.linkedResource = message.linkedResource.map(e => e ? LinkedResource.toJSON(e) : undefined);
    } else {
      obj.linkedResource = [];
    }
    if (message.linkedEntity) {
      obj.linkedEntity = message.linkedEntity.map(e => e ? LinkedEntity.toJSON(e) : undefined);
    } else {
      obj.linkedEntity = [];
    }
    message.alsoKnownAs !== undefined && (obj.alsoKnownAs = message.alsoKnownAs);
    message.signer !== undefined && (obj.signer = message.signer);
    if (message.linkedClaim) {
      obj.linkedClaim = message.linkedClaim.map(e => e ? LinkedClaim.toJSON(e) : undefined);
    } else {
      obj.linkedClaim = [];
    }
    return obj;
  },
  fromPartial(object) {
    var _object$id2, _object$controllers2, _object$context3, _object$verifications2, _object$services2, _object$accordedRight2, _object$linkedResourc2, _object$linkedEntity2, _object$alsoKnownAs2, _object$signer2, _object$linkedClaim2;
    const message = createBaseMsgUpdateIidDocument();
    message.id = (_object$id2 = object.id) !== null && _object$id2 !== void 0 ? _object$id2 : "";
    message.controllers = ((_object$controllers2 = object.controllers) === null || _object$controllers2 === void 0 ? void 0 : _object$controllers2.map(e => e)) || [];
    message.context = ((_object$context3 = object.context) === null || _object$context3 === void 0 ? void 0 : _object$context3.map(e => Context.fromPartial(e))) || [];
    message.verifications = ((_object$verifications2 = object.verifications) === null || _object$verifications2 === void 0 ? void 0 : _object$verifications2.map(e => Verification.fromPartial(e))) || [];
    message.services = ((_object$services2 = object.services) === null || _object$services2 === void 0 ? void 0 : _object$services2.map(e => Service.fromPartial(e))) || [];
    message.accordedRight = ((_object$accordedRight2 = object.accordedRight) === null || _object$accordedRight2 === void 0 ? void 0 : _object$accordedRight2.map(e => AccordedRight.fromPartial(e))) || [];
    message.linkedResource = ((_object$linkedResourc2 = object.linkedResource) === null || _object$linkedResourc2 === void 0 ? void 0 : _object$linkedResourc2.map(e => LinkedResource.fromPartial(e))) || [];
    message.linkedEntity = ((_object$linkedEntity2 = object.linkedEntity) === null || _object$linkedEntity2 === void 0 ? void 0 : _object$linkedEntity2.map(e => LinkedEntity.fromPartial(e))) || [];
    message.alsoKnownAs = (_object$alsoKnownAs2 = object.alsoKnownAs) !== null && _object$alsoKnownAs2 !== void 0 ? _object$alsoKnownAs2 : "";
    message.signer = (_object$signer2 = object.signer) !== null && _object$signer2 !== void 0 ? _object$signer2 : "";
    message.linkedClaim = ((_object$linkedClaim2 = object.linkedClaim) === null || _object$linkedClaim2 === void 0 ? void 0 : _object$linkedClaim2.map(e => LinkedClaim.fromPartial(e))) || [];
    return message;
  }
};
function createBaseMsgUpdateIidDocumentResponse() {
  return {};
}
export const MsgUpdateIidDocumentResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgUpdateIidDocumentResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgUpdateIidDocumentResponse();
    return message;
  }
};
function createBaseMsgAddVerification() {
  return {
    id: "",
    verification: undefined,
    signer: ""
  };
}
export const MsgAddVerification = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.verification !== undefined) {
      Verification.encode(message.verification, writer.uint32(18).fork()).ldelim();
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddVerification();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.verification = Verification.decode(reader, reader.uint32());
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      verification: isSet(object.verification) ? Verification.fromJSON(object.verification) : undefined,
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.verification !== undefined && (obj.verification = message.verification ? Verification.toJSON(message.verification) : undefined);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id3, _object$signer3;
    const message = createBaseMsgAddVerification();
    message.id = (_object$id3 = object.id) !== null && _object$id3 !== void 0 ? _object$id3 : "";
    message.verification = object.verification !== undefined && object.verification !== null ? Verification.fromPartial(object.verification) : undefined;
    message.signer = (_object$signer3 = object.signer) !== null && _object$signer3 !== void 0 ? _object$signer3 : "";
    return message;
  }
};
function createBaseMsgAddVerificationResponse() {
  return {};
}
export const MsgAddVerificationResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddVerificationResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgAddVerificationResponse();
    return message;
  }
};
function createBaseMsgSetVerificationRelationships() {
  return {
    id: "",
    methodId: "",
    relationships: [],
    signer: ""
  };
}
export const MsgSetVerificationRelationships = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.methodId !== "") {
      writer.uint32(18).string(message.methodId);
    }
    for (const v of message.relationships) {
      writer.uint32(26).string(v);
    }
    if (message.signer !== "") {
      writer.uint32(34).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgSetVerificationRelationships();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.methodId = reader.string();
          break;
        case 3:
          message.relationships.push(reader.string());
          break;
        case 4:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      methodId: isSet(object.methodId) ? String(object.methodId) : "",
      relationships: Array.isArray(object === null || object === void 0 ? void 0 : object.relationships) ? object.relationships.map(e => String(e)) : [],
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.methodId !== undefined && (obj.methodId = message.methodId);
    if (message.relationships) {
      obj.relationships = message.relationships.map(e => e);
    } else {
      obj.relationships = [];
    }
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id4, _object$methodId, _object$relationships2, _object$signer4;
    const message = createBaseMsgSetVerificationRelationships();
    message.id = (_object$id4 = object.id) !== null && _object$id4 !== void 0 ? _object$id4 : "";
    message.methodId = (_object$methodId = object.methodId) !== null && _object$methodId !== void 0 ? _object$methodId : "";
    message.relationships = ((_object$relationships2 = object.relationships) === null || _object$relationships2 === void 0 ? void 0 : _object$relationships2.map(e => e)) || [];
    message.signer = (_object$signer4 = object.signer) !== null && _object$signer4 !== void 0 ? _object$signer4 : "";
    return message;
  }
};
function createBaseMsgSetVerificationRelationshipsResponse() {
  return {};
}
export const MsgSetVerificationRelationshipsResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgSetVerificationRelationshipsResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgSetVerificationRelationshipsResponse();
    return message;
  }
};
function createBaseMsgRevokeVerification() {
  return {
    id: "",
    methodId: "",
    signer: ""
  };
}
export const MsgRevokeVerification = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.methodId !== "") {
      writer.uint32(18).string(message.methodId);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgRevokeVerification();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.methodId = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      methodId: isSet(object.methodId) ? String(object.methodId) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.methodId !== undefined && (obj.methodId = message.methodId);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id5, _object$methodId2, _object$signer5;
    const message = createBaseMsgRevokeVerification();
    message.id = (_object$id5 = object.id) !== null && _object$id5 !== void 0 ? _object$id5 : "";
    message.methodId = (_object$methodId2 = object.methodId) !== null && _object$methodId2 !== void 0 ? _object$methodId2 : "";
    message.signer = (_object$signer5 = object.signer) !== null && _object$signer5 !== void 0 ? _object$signer5 : "";
    return message;
  }
};
function createBaseMsgRevokeVerificationResponse() {
  return {};
}
export const MsgRevokeVerificationResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgRevokeVerificationResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgRevokeVerificationResponse();
    return message;
  }
};
function createBaseMsgAddService() {
  return {
    id: "",
    serviceData: undefined,
    signer: ""
  };
}
export const MsgAddService = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.serviceData !== undefined) {
      Service.encode(message.serviceData, writer.uint32(18).fork()).ldelim();
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddService();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.serviceData = Service.decode(reader, reader.uint32());
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      serviceData: isSet(object.serviceData) ? Service.fromJSON(object.serviceData) : undefined,
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.serviceData !== undefined && (obj.serviceData = message.serviceData ? Service.toJSON(message.serviceData) : undefined);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id6, _object$signer6;
    const message = createBaseMsgAddService();
    message.id = (_object$id6 = object.id) !== null && _object$id6 !== void 0 ? _object$id6 : "";
    message.serviceData = object.serviceData !== undefined && object.serviceData !== null ? Service.fromPartial(object.serviceData) : undefined;
    message.signer = (_object$signer6 = object.signer) !== null && _object$signer6 !== void 0 ? _object$signer6 : "";
    return message;
  }
};
function createBaseMsgAddServiceResponse() {
  return {};
}
export const MsgAddServiceResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddServiceResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgAddServiceResponse();
    return message;
  }
};
function createBaseMsgDeleteService() {
  return {
    id: "",
    serviceId: "",
    signer: ""
  };
}
export const MsgDeleteService = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.serviceId !== "") {
      writer.uint32(18).string(message.serviceId);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteService();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.serviceId = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      serviceId: isSet(object.serviceId) ? String(object.serviceId) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.serviceId !== undefined && (obj.serviceId = message.serviceId);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id7, _object$serviceId, _object$signer7;
    const message = createBaseMsgDeleteService();
    message.id = (_object$id7 = object.id) !== null && _object$id7 !== void 0 ? _object$id7 : "";
    message.serviceId = (_object$serviceId = object.serviceId) !== null && _object$serviceId !== void 0 ? _object$serviceId : "";
    message.signer = (_object$signer7 = object.signer) !== null && _object$signer7 !== void 0 ? _object$signer7 : "";
    return message;
  }
};
function createBaseMsgDeleteServiceResponse() {
  return {};
}
export const MsgDeleteServiceResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteServiceResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgDeleteServiceResponse();
    return message;
  }
};
function createBaseMsgAddController() {
  return {
    id: "",
    controllerDid: "",
    signer: ""
  };
}
export const MsgAddController = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.controllerDid !== "") {
      writer.uint32(18).string(message.controllerDid);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddController();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.controllerDid = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      controllerDid: isSet(object.controllerDid) ? String(object.controllerDid) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.controllerDid !== undefined && (obj.controllerDid = message.controllerDid);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id8, _object$controllerDid, _object$signer8;
    const message = createBaseMsgAddController();
    message.id = (_object$id8 = object.id) !== null && _object$id8 !== void 0 ? _object$id8 : "";
    message.controllerDid = (_object$controllerDid = object.controllerDid) !== null && _object$controllerDid !== void 0 ? _object$controllerDid : "";
    message.signer = (_object$signer8 = object.signer) !== null && _object$signer8 !== void 0 ? _object$signer8 : "";
    return message;
  }
};
function createBaseMsgAddControllerResponse() {
  return {};
}
export const MsgAddControllerResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddControllerResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgAddControllerResponse();
    return message;
  }
};
function createBaseMsgDeleteController() {
  return {
    id: "",
    controllerDid: "",
    signer: ""
  };
}
export const MsgDeleteController = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.controllerDid !== "") {
      writer.uint32(18).string(message.controllerDid);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteController();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.controllerDid = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      controllerDid: isSet(object.controllerDid) ? String(object.controllerDid) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.controllerDid !== undefined && (obj.controllerDid = message.controllerDid);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id9, _object$controllerDid2, _object$signer9;
    const message = createBaseMsgDeleteController();
    message.id = (_object$id9 = object.id) !== null && _object$id9 !== void 0 ? _object$id9 : "";
    message.controllerDid = (_object$controllerDid2 = object.controllerDid) !== null && _object$controllerDid2 !== void 0 ? _object$controllerDid2 : "";
    message.signer = (_object$signer9 = object.signer) !== null && _object$signer9 !== void 0 ? _object$signer9 : "";
    return message;
  }
};
function createBaseMsgDeleteControllerResponse() {
  return {};
}
export const MsgDeleteControllerResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteControllerResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgDeleteControllerResponse();
    return message;
  }
};
function createBaseMsgAddLinkedResource() {
  return {
    id: "",
    linkedResource: undefined,
    signer: ""
  };
}
export const MsgAddLinkedResource = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.linkedResource !== undefined) {
      LinkedResource.encode(message.linkedResource, writer.uint32(18).fork()).ldelim();
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddLinkedResource();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.linkedResource = LinkedResource.decode(reader, reader.uint32());
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      linkedResource: isSet(object.linkedResource) ? LinkedResource.fromJSON(object.linkedResource) : undefined,
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.linkedResource !== undefined && (obj.linkedResource = message.linkedResource ? LinkedResource.toJSON(message.linkedResource) : undefined);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id0, _object$signer0;
    const message = createBaseMsgAddLinkedResource();
    message.id = (_object$id0 = object.id) !== null && _object$id0 !== void 0 ? _object$id0 : "";
    message.linkedResource = object.linkedResource !== undefined && object.linkedResource !== null ? LinkedResource.fromPartial(object.linkedResource) : undefined;
    message.signer = (_object$signer0 = object.signer) !== null && _object$signer0 !== void 0 ? _object$signer0 : "";
    return message;
  }
};
function createBaseMsgDeleteLinkedResource() {
  return {
    id: "",
    resourceId: "",
    signer: ""
  };
}
export const MsgDeleteLinkedResource = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.resourceId !== "") {
      writer.uint32(18).string(message.resourceId);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteLinkedResource();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.resourceId = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      resourceId: isSet(object.resourceId) ? String(object.resourceId) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.resourceId !== undefined && (obj.resourceId = message.resourceId);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id1, _object$resourceId, _object$signer1;
    const message = createBaseMsgDeleteLinkedResource();
    message.id = (_object$id1 = object.id) !== null && _object$id1 !== void 0 ? _object$id1 : "";
    message.resourceId = (_object$resourceId = object.resourceId) !== null && _object$resourceId !== void 0 ? _object$resourceId : "";
    message.signer = (_object$signer1 = object.signer) !== null && _object$signer1 !== void 0 ? _object$signer1 : "";
    return message;
  }
};
function createBaseMsgAddLinkedClaim() {
  return {
    id: "",
    linkedClaim: undefined,
    signer: ""
  };
}
export const MsgAddLinkedClaim = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.linkedClaim !== undefined) {
      LinkedClaim.encode(message.linkedClaim, writer.uint32(18).fork()).ldelim();
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddLinkedClaim();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.linkedClaim = LinkedClaim.decode(reader, reader.uint32());
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      linkedClaim: isSet(object.linkedClaim) ? LinkedClaim.fromJSON(object.linkedClaim) : undefined,
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.linkedClaim !== undefined && (obj.linkedClaim = message.linkedClaim ? LinkedClaim.toJSON(message.linkedClaim) : undefined);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id10, _object$signer10;
    const message = createBaseMsgAddLinkedClaim();
    message.id = (_object$id10 = object.id) !== null && _object$id10 !== void 0 ? _object$id10 : "";
    message.linkedClaim = object.linkedClaim !== undefined && object.linkedClaim !== null ? LinkedClaim.fromPartial(object.linkedClaim) : undefined;
    message.signer = (_object$signer10 = object.signer) !== null && _object$signer10 !== void 0 ? _object$signer10 : "";
    return message;
  }
};
function createBaseMsgDeleteLinkedClaim() {
  return {
    id: "",
    claimId: "",
    signer: ""
  };
}
export const MsgDeleteLinkedClaim = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.claimId !== "") {
      writer.uint32(18).string(message.claimId);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteLinkedClaim();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.claimId = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      claimId: isSet(object.claimId) ? String(object.claimId) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.claimId !== undefined && (obj.claimId = message.claimId);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id11, _object$claimId, _object$signer11;
    const message = createBaseMsgDeleteLinkedClaim();
    message.id = (_object$id11 = object.id) !== null && _object$id11 !== void 0 ? _object$id11 : "";
    message.claimId = (_object$claimId = object.claimId) !== null && _object$claimId !== void 0 ? _object$claimId : "";
    message.signer = (_object$signer11 = object.signer) !== null && _object$signer11 !== void 0 ? _object$signer11 : "";
    return message;
  }
};
function createBaseMsgAddLinkedEntity() {
  return {
    id: "",
    linkedEntity: undefined,
    signer: ""
  };
}
export const MsgAddLinkedEntity = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.linkedEntity !== undefined) {
      LinkedEntity.encode(message.linkedEntity, writer.uint32(18).fork()).ldelim();
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddLinkedEntity();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.linkedEntity = LinkedEntity.decode(reader, reader.uint32());
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      linkedEntity: isSet(object.linkedEntity) ? LinkedEntity.fromJSON(object.linkedEntity) : undefined,
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.linkedEntity !== undefined && (obj.linkedEntity = message.linkedEntity ? LinkedEntity.toJSON(message.linkedEntity) : undefined);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id12, _object$signer12;
    const message = createBaseMsgAddLinkedEntity();
    message.id = (_object$id12 = object.id) !== null && _object$id12 !== void 0 ? _object$id12 : "";
    message.linkedEntity = object.linkedEntity !== undefined && object.linkedEntity !== null ? LinkedEntity.fromPartial(object.linkedEntity) : undefined;
    message.signer = (_object$signer12 = object.signer) !== null && _object$signer12 !== void 0 ? _object$signer12 : "";
    return message;
  }
};
function createBaseMsgDeleteLinkedEntity() {
  return {
    id: "",
    entityId: "",
    signer: ""
  };
}
export const MsgDeleteLinkedEntity = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.entityId !== "") {
      writer.uint32(18).string(message.entityId);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteLinkedEntity();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.entityId = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      entityId: isSet(object.entityId) ? String(object.entityId) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.entityId !== undefined && (obj.entityId = message.entityId);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id13, _object$entityId, _object$signer13;
    const message = createBaseMsgDeleteLinkedEntity();
    message.id = (_object$id13 = object.id) !== null && _object$id13 !== void 0 ? _object$id13 : "";
    message.entityId = (_object$entityId = object.entityId) !== null && _object$entityId !== void 0 ? _object$entityId : "";
    message.signer = (_object$signer13 = object.signer) !== null && _object$signer13 !== void 0 ? _object$signer13 : "";
    return message;
  }
};
function createBaseMsgAddAccordedRight() {
  return {
    id: "",
    accordedRight: undefined,
    signer: ""
  };
}
export const MsgAddAccordedRight = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.accordedRight !== undefined) {
      AccordedRight.encode(message.accordedRight, writer.uint32(18).fork()).ldelim();
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddAccordedRight();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.accordedRight = AccordedRight.decode(reader, reader.uint32());
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      accordedRight: isSet(object.accordedRight) ? AccordedRight.fromJSON(object.accordedRight) : undefined,
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.accordedRight !== undefined && (obj.accordedRight = message.accordedRight ? AccordedRight.toJSON(message.accordedRight) : undefined);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id14, _object$signer14;
    const message = createBaseMsgAddAccordedRight();
    message.id = (_object$id14 = object.id) !== null && _object$id14 !== void 0 ? _object$id14 : "";
    message.accordedRight = object.accordedRight !== undefined && object.accordedRight !== null ? AccordedRight.fromPartial(object.accordedRight) : undefined;
    message.signer = (_object$signer14 = object.signer) !== null && _object$signer14 !== void 0 ? _object$signer14 : "";
    return message;
  }
};
function createBaseMsgDeleteAccordedRight() {
  return {
    id: "",
    rightId: "",
    signer: ""
  };
}
export const MsgDeleteAccordedRight = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.rightId !== "") {
      writer.uint32(18).string(message.rightId);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteAccordedRight();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.rightId = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      rightId: isSet(object.rightId) ? String(object.rightId) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.rightId !== undefined && (obj.rightId = message.rightId);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id15, _object$rightId, _object$signer15;
    const message = createBaseMsgDeleteAccordedRight();
    message.id = (_object$id15 = object.id) !== null && _object$id15 !== void 0 ? _object$id15 : "";
    message.rightId = (_object$rightId = object.rightId) !== null && _object$rightId !== void 0 ? _object$rightId : "";
    message.signer = (_object$signer15 = object.signer) !== null && _object$signer15 !== void 0 ? _object$signer15 : "";
    return message;
  }
};
function createBaseMsgAddIidContext() {
  return {
    id: "",
    context: undefined,
    signer: ""
  };
}
export const MsgAddIidContext = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.context !== undefined) {
      Context.encode(message.context, writer.uint32(18).fork()).ldelim();
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddIidContext();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.context = Context.decode(reader, reader.uint32());
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      context: isSet(object.context) ? Context.fromJSON(object.context) : undefined,
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.context !== undefined && (obj.context = message.context ? Context.toJSON(message.context) : undefined);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id16, _object$signer16;
    const message = createBaseMsgAddIidContext();
    message.id = (_object$id16 = object.id) !== null && _object$id16 !== void 0 ? _object$id16 : "";
    message.context = object.context !== undefined && object.context !== null ? Context.fromPartial(object.context) : undefined;
    message.signer = (_object$signer16 = object.signer) !== null && _object$signer16 !== void 0 ? _object$signer16 : "";
    return message;
  }
};
function createBaseMsgDeactivateIID() {
  return {
    id: "",
    state: false,
    signer: ""
  };
}
export const MsgDeactivateIID = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.state === true) {
      writer.uint32(16).bool(message.state);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeactivateIID();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.state = reader.bool();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      state: isSet(object.state) ? Boolean(object.state) : false,
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.state !== undefined && (obj.state = message.state);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id17, _object$state, _object$signer17;
    const message = createBaseMsgDeactivateIID();
    message.id = (_object$id17 = object.id) !== null && _object$id17 !== void 0 ? _object$id17 : "";
    message.state = (_object$state = object.state) !== null && _object$state !== void 0 ? _object$state : false;
    message.signer = (_object$signer17 = object.signer) !== null && _object$signer17 !== void 0 ? _object$signer17 : "";
    return message;
  }
};
function createBaseMsgDeleteIidContext() {
  return {
    id: "",
    contextKey: "",
    signer: ""
  };
}
export const MsgDeleteIidContext = {
  encode(message, writer = _m0.Writer.create()) {
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.contextKey !== "") {
      writer.uint32(18).string(message.contextKey);
    }
    if (message.signer !== "") {
      writer.uint32(26).string(message.signer);
    }
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteIidContext();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.contextKey = reader.string();
          break;
        case 3:
          message.signer = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(object) {
    return {
      id: isSet(object.id) ? String(object.id) : "",
      contextKey: isSet(object.contextKey) ? String(object.contextKey) : "",
      signer: isSet(object.signer) ? String(object.signer) : ""
    };
  },
  toJSON(message) {
    const obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.contextKey !== undefined && (obj.contextKey = message.contextKey);
    message.signer !== undefined && (obj.signer = message.signer);
    return obj;
  },
  fromPartial(object) {
    var _object$id18, _object$contextKey, _object$signer18;
    const message = createBaseMsgDeleteIidContext();
    message.id = (_object$id18 = object.id) !== null && _object$id18 !== void 0 ? _object$id18 : "";
    message.contextKey = (_object$contextKey = object.contextKey) !== null && _object$contextKey !== void 0 ? _object$contextKey : "";
    message.signer = (_object$signer18 = object.signer) !== null && _object$signer18 !== void 0 ? _object$signer18 : "";
    return message;
  }
};
function createBaseMsgAddLinkedResourceResponse() {
  return {};
}
export const MsgAddLinkedResourceResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddLinkedResourceResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgAddLinkedResourceResponse();
    return message;
  }
};
function createBaseMsgDeleteLinkedResourceResponse() {
  return {};
}
export const MsgDeleteLinkedResourceResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteLinkedResourceResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgDeleteLinkedResourceResponse();
    return message;
  }
};
function createBaseMsgAddLinkedClaimResponse() {
  return {};
}
export const MsgAddLinkedClaimResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddLinkedClaimResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgAddLinkedClaimResponse();
    return message;
  }
};
function createBaseMsgDeleteLinkedClaimResponse() {
  return {};
}
export const MsgDeleteLinkedClaimResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteLinkedClaimResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgDeleteLinkedClaimResponse();
    return message;
  }
};
function createBaseMsgAddLinkedEntityResponse() {
  return {};
}
export const MsgAddLinkedEntityResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddLinkedEntityResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgAddLinkedEntityResponse();
    return message;
  }
};
function createBaseMsgDeleteLinkedEntityResponse() {
  return {};
}
export const MsgDeleteLinkedEntityResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteLinkedEntityResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgDeleteLinkedEntityResponse();
    return message;
  }
};
function createBaseMsgAddAccordedRightResponse() {
  return {};
}
export const MsgAddAccordedRightResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddAccordedRightResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgAddAccordedRightResponse();
    return message;
  }
};
function createBaseMsgDeleteAccordedRightResponse() {
  return {};
}
export const MsgDeleteAccordedRightResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteAccordedRightResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgDeleteAccordedRightResponse();
    return message;
  }
};
function createBaseMsgAddIidContextResponse() {
  return {};
}
export const MsgAddIidContextResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgAddIidContextResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgAddIidContextResponse();
    return message;
  }
};
function createBaseMsgDeleteIidContextResponse() {
  return {};
}
export const MsgDeleteIidContextResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeleteIidContextResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgDeleteIidContextResponse();
    return message;
  }
};
function createBaseMsgDeactivateIIDResponse() {
  return {};
}
export const MsgDeactivateIIDResponse = {
  encode(_, writer = _m0.Writer.create()) {
    return writer;
  },
  decode(input, length) {
    const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseMsgDeactivateIIDResponse();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON(_) {
    return {};
  },
  toJSON(_) {
    const obj = {};
    return obj;
  },
  fromPartial(_) {
    const message = createBaseMsgDeactivateIIDResponse();
    return message;
  }
};