/**
 * Generated by the protoc-gen-ts.  DO NOT EDIT!
 * compiler version: 3.20.3
 * source: ibc/applications/interchain_accounts/host/v1/tx.proto
 * git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./../../../../../gogoproto/gogo";
import * as dependency_2 from "./../../../../../cosmos/msg/v1/msg";
import * as dependency_3 from "./host";
import * as pb_1 from "google-protobuf";
import * as grpc_1 from "@grpc/grpc-js";
export namespace ibc.applications.interchain_accounts.host.v1 {
    export class MsgUpdateParams extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            signer?: string;
            params?: dependency_3.ibc.applications.interchain_accounts.host.v1.Params;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("signer" in data && data.signer != undefined) {
                    this.signer = data.signer;
                }
                if ("params" in data && data.params != undefined) {
                    this.params = data.params;
                }
            }
        }
        get signer() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set signer(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get params() {
            return pb_1.Message.getWrapperField(this, dependency_3.ibc.applications.interchain_accounts.host.v1.Params, 2) as dependency_3.ibc.applications.interchain_accounts.host.v1.Params;
        }
        set params(value: dependency_3.ibc.applications.interchain_accounts.host.v1.Params) {
            pb_1.Message.setWrapperField(this, 2, value);
        }
        get has_params() {
            return pb_1.Message.getField(this, 2) != null;
        }
        static fromObject(data: {
            signer?: string;
            params?: ReturnType<typeof dependency_3.ibc.applications.interchain_accounts.host.v1.Params.prototype.toObject>;
        }): MsgUpdateParams {
            const message = new MsgUpdateParams({});
            if (data.signer != null) {
                message.signer = data.signer;
            }
            if (data.params != null) {
                message.params = dependency_3.ibc.applications.interchain_accounts.host.v1.Params.fromObject(data.params);
            }
            return message;
        }
        toObject() {
            const data: {
                signer?: string;
                params?: ReturnType<typeof dependency_3.ibc.applications.interchain_accounts.host.v1.Params.prototype.toObject>;
            } = {};
            if (this.signer != null) {
                data.signer = this.signer;
            }
            if (this.params != null) {
                data.params = this.params.toObject();
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.signer.length)
                writer.writeString(1, this.signer);
            if (this.has_params)
                writer.writeMessage(2, this.params, () => this.params.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParams {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParams();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.signer = reader.readString();
                        break;
                    case 2:
                        reader.readMessage(message.params, () => message.params = dependency_3.ibc.applications.interchain_accounts.host.v1.Params.deserialize(reader));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): MsgUpdateParams {
            return MsgUpdateParams.deserialize(bytes);
        }
    }
    export class MsgUpdateParamsResponse extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {}) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") { }
        }
        static fromObject(data: {}): MsgUpdateParamsResponse {
            const message = new MsgUpdateParamsResponse({});
            return message;
        }
        toObject() {
            const data: {} = {};
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgUpdateParamsResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgUpdateParamsResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): MsgUpdateParamsResponse {
            return MsgUpdateParamsResponse.deserialize(bytes);
        }
    }
    export class MsgModuleQuerySafe extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            signer?: string;
            requests?: dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("signer" in data && data.signer != undefined) {
                    this.signer = data.signer;
                }
                if ("requests" in data && data.requests != undefined) {
                    this.requests = data.requests;
                }
            }
        }
        get signer() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set signer(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get requests() {
            return pb_1.Message.getRepeatedWrapperField(this, dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest, 2) as dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest[];
        }
        set requests(value: dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        static fromObject(data: {
            signer?: string;
            requests?: ReturnType<typeof dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.toObject>[];
        }): MsgModuleQuerySafe {
            const message = new MsgModuleQuerySafe({});
            if (data.signer != null) {
                message.signer = data.signer;
            }
            if (data.requests != null) {
                message.requests = data.requests.map(item => dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                signer?: string;
                requests?: ReturnType<typeof dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest.prototype.toObject>[];
            } = {};
            if (this.signer != null) {
                data.signer = this.signer;
            }
            if (this.requests != null) {
                data.requests = this.requests.map((item: dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest) => item.toObject());
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.signer.length)
                writer.writeString(1, this.signer);
            if (this.requests.length)
                writer.writeRepeatedMessage(2, this.requests, (item: dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgModuleQuerySafe {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgModuleQuerySafe();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.signer = reader.readString();
                        break;
                    case 2:
                        reader.readMessage(message.requests, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest.deserialize(reader), dependency_3.ibc.applications.interchain_accounts.host.v1.QueryRequest));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): MsgModuleQuerySafe {
            return MsgModuleQuerySafe.deserialize(bytes);
        }
    }
    export class MsgModuleQuerySafeResponse extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            height?: number;
            responses?: Uint8Array[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("height" in data && data.height != undefined) {
                    this.height = data.height;
                }
                if ("responses" in data && data.responses != undefined) {
                    this.responses = data.responses;
                }
            }
        }
        get height() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set height(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get responses() {
            return pb_1.Message.getFieldWithDefault(this, 2, []) as Uint8Array[];
        }
        set responses(value: Uint8Array[]) {
            pb_1.Message.setField(this, 2, value);
        }
        static fromObject(data: {
            height?: number;
            responses?: Uint8Array[];
        }): MsgModuleQuerySafeResponse {
            const message = new MsgModuleQuerySafeResponse({});
            if (data.height != null) {
                message.height = data.height;
            }
            if (data.responses != null) {
                message.responses = data.responses;
            }
            return message;
        }
        toObject() {
            const data: {
                height?: number;
                responses?: Uint8Array[];
            } = {};
            if (this.height != null) {
                data.height = this.height;
            }
            if (this.responses != null) {
                data.responses = this.responses;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.height != 0)
                writer.writeUint64(1, this.height);
            if (this.responses.length)
                writer.writeRepeatedBytes(2, this.responses);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): MsgModuleQuerySafeResponse {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MsgModuleQuerySafeResponse();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.height = reader.readUint64();
                        break;
                    case 2:
                        pb_1.Message.addToRepeatedField(message, 2, reader.readBytes());
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): MsgModuleQuerySafeResponse {
            return MsgModuleQuerySafeResponse.deserialize(bytes);
        }
    }
    interface GrpcUnaryServiceInterface<P, R> {
        (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
        (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
        (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
        (message: P, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
    }
    interface GrpcStreamServiceInterface<P, R> {
        (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
        (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
    }
    interface GrpWritableServiceInterface<P, R> {
        (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
        (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
        (options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
        (callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
    }
    interface GrpcChunkServiceInterface<P, R> {
        (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
        (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
    }
    interface GrpcPromiseServiceInterface<P, R> {
        (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise<R>;
        (message: P, options?: grpc_1.CallOptions): Promise<R>;
    }
    export abstract class UnimplementedMsgService {
        static definition = {
            UpdateParams: {
                path: "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: MsgUpdateParams) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => MsgUpdateParams.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: MsgUpdateParamsResponse) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => MsgUpdateParamsResponse.deserialize(new Uint8Array(bytes))
            },
            ModuleQuerySafe: {
                path: "/ibc.applications.interchain_accounts.host.v1.Msg/ModuleQuerySafe",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: MsgModuleQuerySafe) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => MsgModuleQuerySafe.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: MsgModuleQuerySafeResponse) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => MsgModuleQuerySafeResponse.deserialize(new Uint8Array(bytes))
            }
        };
        [method: string]: grpc_1.UntypedHandleCall;
        abstract UpdateParams(call: grpc_1.ServerUnaryCall<MsgUpdateParams, MsgUpdateParamsResponse>, callback: grpc_1.sendUnaryData<MsgUpdateParamsResponse>): void;
        abstract ModuleQuerySafe(call: grpc_1.ServerUnaryCall<MsgModuleQuerySafe, MsgModuleQuerySafeResponse>, callback: grpc_1.sendUnaryData<MsgModuleQuerySafeResponse>): void;
    }
    export class MsgClient extends grpc_1.makeGenericClientConstructor(UnimplementedMsgService.definition, "Msg", {}) {
        constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial<grpc_1.ChannelOptions>) {
            super(address, credentials, options);
        }
        UpdateParams: GrpcUnaryServiceInterface<MsgUpdateParams, MsgUpdateParamsResponse> = (message: MsgUpdateParams, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<MsgUpdateParamsResponse>, options?: grpc_1.CallOptions | grpc_1.requestCallback<MsgUpdateParamsResponse>, callback?: grpc_1.requestCallback<MsgUpdateParamsResponse>): grpc_1.ClientUnaryCall => {
            return super.UpdateParams(message, metadata, options, callback);
        };
        ModuleQuerySafe: GrpcUnaryServiceInterface<MsgModuleQuerySafe, MsgModuleQuerySafeResponse> = (message: MsgModuleQuerySafe, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<MsgModuleQuerySafeResponse>, options?: grpc_1.CallOptions | grpc_1.requestCallback<MsgModuleQuerySafeResponse>, callback?: grpc_1.requestCallback<MsgModuleQuerySafeResponse>): grpc_1.ClientUnaryCall => {
            return super.ModuleQuerySafe(message, metadata, options, callback);
        };
    }
}
