"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.QueryConfigResponse = exports.QueryConfigRequest = void 0;
var _config = require("./config");
var _binary = require("../../../binary");
var _helpers = require("../../../helpers");
/** QueryConfigRequest is the Query/Config request type. */

/** QueryConfigRequest is the Query/Config request type. */

/** QueryConfigRequest is the Query/Config request type. */

/** QueryConfigRequest is the Query/Config response type. */

/** QueryConfigRequest is the Query/Config response type. */

/** QueryConfigRequest is the Query/Config response type. */

function createBaseQueryConfigRequest() {
  return {};
}
var QueryConfigRequest = exports.QueryConfigRequest = {
  typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest",
  encode: function encode(_) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _binary.BinaryWriter.create();
    return writer;
  },
  fromJSON: function fromJSON(_) {
    return {};
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseQueryConfigRequest();
    return message;
  },
  fromAmino: function fromAmino(_) {
    var message = createBaseQueryConfigRequest();
    return message;
  },
  toAmino: function toAmino(_) {
    var obj = {};
    return obj;
  },
  fromAminoMsg: function fromAminoMsg(object) {
    return QueryConfigRequest.fromAmino(object.value);
  },
  toAminoMsg: function toAminoMsg(message) {
    return {
      type: "cosmos-sdk/QueryConfigRequest",
      value: QueryConfigRequest.toAmino(message)
    };
  },
  fromProtoMsg: function fromProtoMsg(message) {
    return QueryConfigRequest.decode(message.value);
  },
  toProto: function toProto(message) {
    return QueryConfigRequest.encode(message).finish();
  },
  toProtoMsg: function toProtoMsg(message) {
    return {
      typeUrl: "/cosmos.app.v1alpha1.QueryConfigRequest",
      value: QueryConfigRequest.encode(message).finish()
    };
  }
};
function createBaseQueryConfigResponse() {
  return {
    config: undefined
  };
}
var QueryConfigResponse = exports.QueryConfigResponse = {
  typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse",
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _binary.BinaryWriter.create();
    if (message.config !== undefined) {
      _config.Config.encode(message.config, writer.uint32(10).fork()).ldelim();
    }
    return writer;
  },
  fromJSON: function fromJSON(object) {
    return {
      config: (0, _helpers.isSet)(object.config) ? _config.Config.fromJSON(object.config) : undefined
    };
  },
  fromPartial: function fromPartial(object) {
    var message = createBaseQueryConfigResponse();
    message.config = object.config !== undefined && object.config !== null ? _config.Config.fromPartial(object.config) : undefined;
    return message;
  },
  fromAmino: function fromAmino(object) {
    var message = createBaseQueryConfigResponse();
    if (object.config !== undefined && object.config !== null) {
      message.config = _config.Config.fromAmino(object.config);
    }
    return message;
  },
  toAmino: function toAmino(message) {
    var obj = {};
    obj.config = message.config ? _config.Config.toAmino(message.config) : undefined;
    return obj;
  },
  fromAminoMsg: function fromAminoMsg(object) {
    return QueryConfigResponse.fromAmino(object.value);
  },
  toAminoMsg: function toAminoMsg(message) {
    return {
      type: "cosmos-sdk/QueryConfigResponse",
      value: QueryConfigResponse.toAmino(message)
    };
  },
  fromProtoMsg: function fromProtoMsg(message) {
    return QueryConfigResponse.decode(message.value);
  },
  toProto: function toProto(message) {
    return QueryConfigResponse.encode(message).finish();
  },
  toProtoMsg: function toProtoMsg(message) {
    return {
      typeUrl: "/cosmos.app.v1alpha1.QueryConfigResponse",
      value: QueryConfigResponse.encode(message).finish()
    };
  }
};