// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v2.3.0
//   protoc               unknown
// source: feeabstraction/feeabs/v1beta1/params.proto

/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";

/** Params defines the parameters for the feeabs module. */
export interface Params {
  /** native ibced in osmosis */
  nativeIbcedInOsmosis: string;
  /** osmosis query TWAP path */
  osmosisQueryTwapPath: string;
  /** chain name for ibc path unwinding */
  chainName: string;
  /** transfer channel for cross chain swap with osmosis */
  ibcTransferChannel: string;
  /** query twap price icq channel with osmosis */
  ibcQueryIcqChannel: string;
  /** osmosis crosschain swap contract address */
  osmosisCrosschainSwapAddress: string;
}

function createBaseParams(): Params {
  return {
    nativeIbcedInOsmosis: "",
    osmosisQueryTwapPath: "",
    chainName: "",
    ibcTransferChannel: "",
    ibcQueryIcqChannel: "",
    osmosisCrosschainSwapAddress: "",
  };
}

export const Params: MessageFns<Params> = {
  encode(message: Params, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
    if (message.nativeIbcedInOsmosis !== "") {
      writer.uint32(10).string(message.nativeIbcedInOsmosis);
    }
    if (message.osmosisQueryTwapPath !== "") {
      writer.uint32(18).string(message.osmosisQueryTwapPath);
    }
    if (message.chainName !== "") {
      writer.uint32(26).string(message.chainName);
    }
    if (message.ibcTransferChannel !== "") {
      writer.uint32(34).string(message.ibcTransferChannel);
    }
    if (message.ibcQueryIcqChannel !== "") {
      writer.uint32(42).string(message.ibcQueryIcqChannel);
    }
    if (message.osmosisCrosschainSwapAddress !== "") {
      writer.uint32(50).string(message.osmosisCrosschainSwapAddress);
    }
    return writer;
  },

  decode(input: BinaryReader | Uint8Array, length?: number): Params {
    const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
    let end = length === undefined ? reader.len : reader.pos + length;
    const message = createBaseParams();
    while (reader.pos < end) {
      const tag = reader.uint32();
      switch (tag >>> 3) {
        case 1: {
          if (tag !== 10) {
            break;
          }

          message.nativeIbcedInOsmosis = reader.string();
          continue;
        }
        case 2: {
          if (tag !== 18) {
            break;
          }

          message.osmosisQueryTwapPath = reader.string();
          continue;
        }
        case 3: {
          if (tag !== 26) {
            break;
          }

          message.chainName = reader.string();
          continue;
        }
        case 4: {
          if (tag !== 34) {
            break;
          }

          message.ibcTransferChannel = reader.string();
          continue;
        }
        case 5: {
          if (tag !== 42) {
            break;
          }

          message.ibcQueryIcqChannel = reader.string();
          continue;
        }
        case 6: {
          if (tag !== 50) {
            break;
          }

          message.osmosisCrosschainSwapAddress = reader.string();
          continue;
        }
      }
      if ((tag & 7) === 4 || tag === 0) {
        break;
      }
      reader.skip(tag & 7);
    }
    return message;
  },

  fromJSON(object: any): Params {
    return {
      nativeIbcedInOsmosis: isSet(object.nativeIbcedInOsmosis) ? globalThis.String(object.nativeIbcedInOsmosis) : "",
      osmosisQueryTwapPath: isSet(object.osmosisQueryTwapPath) ? globalThis.String(object.osmosisQueryTwapPath) : "",
      chainName: isSet(object.chainName) ? globalThis.String(object.chainName) : "",
      ibcTransferChannel: isSet(object.ibcTransferChannel) ? globalThis.String(object.ibcTransferChannel) : "",
      ibcQueryIcqChannel: isSet(object.ibcQueryIcqChannel) ? globalThis.String(object.ibcQueryIcqChannel) : "",
      osmosisCrosschainSwapAddress: isSet(object.osmosisCrosschainSwapAddress)
        ? globalThis.String(object.osmosisCrosschainSwapAddress)
        : "",
    };
  },

  toJSON(message: Params): unknown {
    const obj: any = {};
    if (message.nativeIbcedInOsmosis !== "") {
      obj.nativeIbcedInOsmosis = message.nativeIbcedInOsmosis;
    }
    if (message.osmosisQueryTwapPath !== "") {
      obj.osmosisQueryTwapPath = message.osmosisQueryTwapPath;
    }
    if (message.chainName !== "") {
      obj.chainName = message.chainName;
    }
    if (message.ibcTransferChannel !== "") {
      obj.ibcTransferChannel = message.ibcTransferChannel;
    }
    if (message.ibcQueryIcqChannel !== "") {
      obj.ibcQueryIcqChannel = message.ibcQueryIcqChannel;
    }
    if (message.osmosisCrosschainSwapAddress !== "") {
      obj.osmosisCrosschainSwapAddress = message.osmosisCrosschainSwapAddress;
    }
    return obj;
  },

  create<I extends Exact<DeepPartial<Params>, I>>(base?: I): Params {
    return Params.fromPartial(base ?? ({} as any));
  },
  fromPartial<I extends Exact<DeepPartial<Params>, I>>(object: I): Params {
    const message = createBaseParams();
    message.nativeIbcedInOsmosis = object.nativeIbcedInOsmosis ?? "";
    message.osmosisQueryTwapPath = object.osmosisQueryTwapPath ?? "";
    message.chainName = object.chainName ?? "";
    message.ibcTransferChannel = object.ibcTransferChannel ?? "";
    message.ibcQueryIcqChannel = object.ibcQueryIcqChannel ?? "";
    message.osmosisCrosschainSwapAddress = object.osmosisCrosschainSwapAddress ?? "";
    return message;
  },
};

type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;

type DeepPartial<T> = T extends Builtin ? T
  : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
  : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
  : Partial<T>;

type KeysOfUnion<T> = T extends T ? keyof T : never;
type Exact<P, I extends P> = P extends Builtin ? P
  : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };

function isSet(value: any): boolean {
  return value !== null && value !== undefined;
}

interface MessageFns<T> {
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
  decode(input: BinaryReader | Uint8Array, length?: number): T;
  fromJSON(object: any): T;
  toJSON(message: T): unknown;
  create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
  fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
}
