// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "adminConnection.proto" (package "api", syntax proto3)
// tslint:disable
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { ValueType } from "./shared";
/**
 * @generated from protobuf message api.AdminConnection
 */
export interface AdminConnection {
    /**
     * @generated from protobuf field: string ID = 1 [json_name = "ID"];
     */
    iD: string;
    /**
     * @generated from protobuf field: string UriStartApi = 2 [json_name = "UriStartApi"];
     */
    uriStartApi: string;
    /**
     * @generated from protobuf field: repeated api.ArgElement ArgsUriStart = 3 [json_name = "ArgsUriStart"];
     */
    argsUriStart: ArgElement[];
}
/**
 * @generated from protobuf message api.ArgElement
 */
export interface ArgElement {
    /**
     * @generated from protobuf field: string Key = 1 [json_name = "Key"];
     */
    key: string;
    /**
     * @generated from protobuf field: api.ValueType Value = 2 [json_name = "Value"];
     */
    value?: ValueType;
}
/**
 * @generated from protobuf message api.RegisterConnectionManagerRequest
 */
export interface RegisterConnectionManagerRequest {
    /**
     * @generated from protobuf field: string ID = 1 [json_name = "ID"];
     */
    iD: string;
    /**
     * @generated from protobuf field: string UriStartApi = 2 [json_name = "UriStartApi"];
     */
    uriStartApi: string;
    /**
     * @generated from protobuf field: repeated api.ArgElement ArgsUriStart = 3 [json_name = "ArgsUriStart"];
     */
    argsUriStart: ArgElement[];
}
/**
 * @generated from protobuf message api.RegisterConnectionManagerResult
 */
export interface RegisterConnectionManagerResult {
}
/**
 * @generated from protobuf message api.ListConnectionManagerRequest
 */
export interface ListConnectionManagerRequest {
}
/**
 * @generated from protobuf message api.ListConnectionManagerResult
 */
export interface ListConnectionManagerResult {
    /**
     * @generated from protobuf field: repeated api.AdminConnection Results = 1 [json_name = "Results"];
     */
    results: AdminConnection[];
}
// @generated message type with reflection information, may provide speed optimized methods
class AdminConnection$Type extends MessageType<AdminConnection> {
    constructor() {
        super("api.AdminConnection", [
            { no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "UriStartApi", kind: "scalar", jsonName: "UriStartApi", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "ArgsUriStart", kind: "message", jsonName: "ArgsUriStart", repeat: 1 /*RepeatType.PACKED*/, T: () => ArgElement }
        ]);
    }
    create(value?: PartialMessage<AdminConnection>): AdminConnection {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.iD = "";
        message.uriStartApi = "";
        message.argsUriStart = [];
        if (value !== undefined)
            reflectionMergePartial<AdminConnection>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdminConnection): AdminConnection {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ID = 1 [json_name = "ID"];*/ 1:
                    message.iD = reader.string();
                    break;
                case /* string UriStartApi = 2 [json_name = "UriStartApi"];*/ 2:
                    message.uriStartApi = reader.string();
                    break;
                case /* repeated api.ArgElement ArgsUriStart = 3 [json_name = "ArgsUriStart"];*/ 3:
                    message.argsUriStart.push(ArgElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: AdminConnection, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ID = 1 [json_name = "ID"]; */
        if (message.iD !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.iD);
        /* string UriStartApi = 2 [json_name = "UriStartApi"]; */
        if (message.uriStartApi !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.uriStartApi);
        /* repeated api.ArgElement ArgsUriStart = 3 [json_name = "ArgsUriStart"]; */
        for (let i = 0; i < message.argsUriStart.length; i++)
            ArgElement.internalBinaryWrite(message.argsUriStart[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.AdminConnection
 */
export const AdminConnection = new AdminConnection$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ArgElement$Type extends MessageType<ArgElement> {
    constructor() {
        super("api.ArgElement", [
            { no: 1, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "Value", kind: "message", jsonName: "Value", T: () => ValueType }
        ]);
    }
    create(value?: PartialMessage<ArgElement>): ArgElement {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.key = "";
        if (value !== undefined)
            reflectionMergePartial<ArgElement>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ArgElement): ArgElement {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string Key = 1 [json_name = "Key"];*/ 1:
                    message.key = reader.string();
                    break;
                case /* api.ValueType Value = 2 [json_name = "Value"];*/ 2:
                    message.value = ValueType.internalBinaryRead(reader, reader.uint32(), options, message.value);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ArgElement, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string Key = 1 [json_name = "Key"]; */
        if (message.key !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.key);
        /* api.ValueType Value = 2 [json_name = "Value"]; */
        if (message.value)
            ValueType.internalBinaryWrite(message.value, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ArgElement
 */
export const ArgElement = new ArgElement$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RegisterConnectionManagerRequest$Type extends MessageType<RegisterConnectionManagerRequest> {
    constructor() {
        super("api.RegisterConnectionManagerRequest", [
            { no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "UriStartApi", kind: "scalar", jsonName: "UriStartApi", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 3, name: "ArgsUriStart", kind: "message", jsonName: "ArgsUriStart", repeat: 1 /*RepeatType.PACKED*/, T: () => ArgElement }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ID", "UriStartApi"] } } });
    }
    create(value?: PartialMessage<RegisterConnectionManagerRequest>): RegisterConnectionManagerRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.iD = "";
        message.uriStartApi = "";
        message.argsUriStart = [];
        if (value !== undefined)
            reflectionMergePartial<RegisterConnectionManagerRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RegisterConnectionManagerRequest): RegisterConnectionManagerRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ID = 1 [json_name = "ID"];*/ 1:
                    message.iD = reader.string();
                    break;
                case /* string UriStartApi = 2 [json_name = "UriStartApi"];*/ 2:
                    message.uriStartApi = reader.string();
                    break;
                case /* repeated api.ArgElement ArgsUriStart = 3 [json_name = "ArgsUriStart"];*/ 3:
                    message.argsUriStart.push(ArgElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: RegisterConnectionManagerRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ID = 1 [json_name = "ID"]; */
        if (message.iD !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.iD);
        /* string UriStartApi = 2 [json_name = "UriStartApi"]; */
        if (message.uriStartApi !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.uriStartApi);
        /* repeated api.ArgElement ArgsUriStart = 3 [json_name = "ArgsUriStart"]; */
        for (let i = 0; i < message.argsUriStart.length; i++)
            ArgElement.internalBinaryWrite(message.argsUriStart[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.RegisterConnectionManagerRequest
 */
export const RegisterConnectionManagerRequest = new RegisterConnectionManagerRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RegisterConnectionManagerResult$Type extends MessageType<RegisterConnectionManagerResult> {
    constructor() {
        super("api.RegisterConnectionManagerResult", []);
    }
    create(value?: PartialMessage<RegisterConnectionManagerResult>): RegisterConnectionManagerResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<RegisterConnectionManagerResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RegisterConnectionManagerResult): RegisterConnectionManagerResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: RegisterConnectionManagerResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.RegisterConnectionManagerResult
 */
export const RegisterConnectionManagerResult = new RegisterConnectionManagerResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListConnectionManagerRequest$Type extends MessageType<ListConnectionManagerRequest> {
    constructor() {
        super("api.ListConnectionManagerRequest", []);
    }
    create(value?: PartialMessage<ListConnectionManagerRequest>): ListConnectionManagerRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ListConnectionManagerRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListConnectionManagerRequest): ListConnectionManagerRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ListConnectionManagerRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ListConnectionManagerRequest
 */
export const ListConnectionManagerRequest = new ListConnectionManagerRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListConnectionManagerResult$Type extends MessageType<ListConnectionManagerResult> {
    constructor() {
        super("api.ListConnectionManagerResult", [
            { no: 1, name: "Results", kind: "message", jsonName: "Results", repeat: 1 /*RepeatType.PACKED*/, T: () => AdminConnection, options: { "validate.rules": { repeated: { minItems: "1" } } } }
        ]);
    }
    create(value?: PartialMessage<ListConnectionManagerResult>): ListConnectionManagerResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.results = [];
        if (value !== undefined)
            reflectionMergePartial<ListConnectionManagerResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListConnectionManagerResult): ListConnectionManagerResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.AdminConnection Results = 1 [json_name = "Results"];*/ 1:
                    message.results.push(AdminConnection.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ListConnectionManagerResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.AdminConnection Results = 1 [json_name = "Results"]; */
        for (let i = 0; i < message.results.length; i++)
            AdminConnection.internalBinaryWrite(message.results[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ListConnectionManagerResult
 */
export const ListConnectionManagerResult = new ListConnectionManagerResult$Type();
/**
 * @generated ServiceType for protobuf service api.AdminConnectionService
 */
export const AdminConnectionService = new ServiceType("api.AdminConnectionService", [
    { name: "RegisterConnectionManager", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin Connection Manager"], description: "Register a connection manager in the platform" }, "api.rscType": "Platform", "api.roles": "Platform.Connection", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: RegisterConnectionManagerRequest, O: RegisterConnectionManagerResult },
    { name: "ListConnectionManager", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Admin Connection Manager"], description: "List connections manager" }, "api.rscType": "Platform", "api.roles": "Platform.Connection", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: ListConnectionManagerRequest, O: ListConnectionManagerResult }
], { "api.k8sService": "organisation-server", "api.roleManager": true, "api.resourceManager": true });
