import * as _m0 from "protobufjs/minimal"; import { DeepPartial, isSet } from "@osmonauts/helpers"; /** ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. */ export interface ListAllInterfacesRequest {} /** ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. */ export interface ListAllInterfacesResponse { /** interface_names is an array of all the registered interfaces. */ interface_names: string[]; } /** * ListImplementationsRequest is the request type of the ListImplementations * RPC. */ export interface ListImplementationsRequest { /** interface_name defines the interface to query the implementations for. */ interface_name: string; } /** * ListImplementationsResponse is the response type of the ListImplementations * RPC. */ export interface ListImplementationsResponse { implementation_message_names: string[]; } function createBaseListAllInterfacesRequest(): ListAllInterfacesRequest { return {}; } export const ListAllInterfacesRequest = { encode(_: ListAllInterfacesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ListAllInterfacesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListAllInterfacesRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromJSON(_: any): ListAllInterfacesRequest { return {}; }, toJSON(_: ListAllInterfacesRequest): unknown { const obj: any = {}; return obj; }, fromPartial(_: DeepPartial): ListAllInterfacesRequest { const message = createBaseListAllInterfacesRequest(); return message; } }; function createBaseListAllInterfacesResponse(): ListAllInterfacesResponse { return { interface_names: [] }; } export const ListAllInterfacesResponse = { encode(message: ListAllInterfacesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.interface_names) { writer.uint32(10).string(v!); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ListAllInterfacesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListAllInterfacesResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.interface_names.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromJSON(object: any): ListAllInterfacesResponse { return { interface_names: Array.isArray(object?.interface_names) ? object.interface_names.map((e: any) => String(e)) : [] }; }, toJSON(message: ListAllInterfacesResponse): unknown { const obj: any = {}; if (message.interface_names) { obj.interface_names = message.interface_names.map(e => e); } else { obj.interface_names = []; } return obj; }, fromPartial(object: DeepPartial): ListAllInterfacesResponse { const message = createBaseListAllInterfacesResponse(); message.interface_names = object.interface_names?.map(e => e) || []; return message; } }; function createBaseListImplementationsRequest(): ListImplementationsRequest { return { interface_name: "" }; } export const ListImplementationsRequest = { encode(message: ListImplementationsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.interface_name !== "") { writer.uint32(10).string(message.interface_name); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ListImplementationsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListImplementationsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.interface_name = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromJSON(object: any): ListImplementationsRequest { return { interface_name: isSet(object.interface_name) ? String(object.interface_name) : "" }; }, toJSON(message: ListImplementationsRequest): unknown { const obj: any = {}; message.interface_name !== undefined && (obj.interface_name = message.interface_name); return obj; }, fromPartial(object: DeepPartial): ListImplementationsRequest { const message = createBaseListImplementationsRequest(); message.interface_name = object.interface_name ?? ""; return message; } }; function createBaseListImplementationsResponse(): ListImplementationsResponse { return { implementation_message_names: [] }; } export const ListImplementationsResponse = { encode(message: ListImplementationsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.implementation_message_names) { writer.uint32(10).string(v!); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ListImplementationsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseListImplementationsResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.implementation_message_names.push(reader.string()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromJSON(object: any): ListImplementationsResponse { return { implementation_message_names: Array.isArray(object?.implementation_message_names) ? object.implementation_message_names.map((e: any) => String(e)) : [] }; }, toJSON(message: ListImplementationsResponse): unknown { const obj: any = {}; if (message.implementation_message_names) { obj.implementation_message_names = message.implementation_message_names.map(e => e); } else { obj.implementation_message_names = []; } return obj; }, fromPartial(object: DeepPartial): ListImplementationsResponse { const message = createBaseListImplementationsResponse(); message.implementation_message_names = object.implementation_message_names?.map(e => e) || []; return message; } };