// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "admin-partner.proto" (package "api", syntax proto3)
// tslint:disable
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 { AdminActor } from "./admin-actor";
import { Address } from "./repositoryShared";
/**
 * @generated from protobuf message api.AdminPartner
 */
export interface AdminPartner {
    /**
     * @generated from protobuf field: string ID = 1 [json_name = "ID"];
     */
    iD: string;
    /**
     * @generated from protobuf field: string Name = 2 [json_name = "Name"];
     */
    name: string;
    /**
     * @generated from protobuf field: string LegalStructure = 3 [json_name = "LegalStructure"];
     */
    legalStructure: string;
    /**
     * @generated from protobuf field: api.Address Address = 4 [json_name = "Address"];
     */
    address?: Address;
    /**
     * @generated from protobuf field: string OrganisationID = 5 [json_name = "OrganisationID"];
     */
    organisationID: string;
    /**
     * In ActorIDs are given / Out not present
     *
     * @generated from protobuf field: repeated string ActorIDs = 6 [json_name = "ActorIDs"];
     */
    actorIDs: string[];
    /**
     * In not accepted / Out Actors are returned
     *
     * @generated from protobuf field: repeated api.AdminActor Actors = 7 [json_name = "Actors"];
     */
    actors: AdminActor[];
    /**
     * @generated from protobuf field: string PhotoURI = 8 [json_name = "PhotoURI"];
     */
    photoURI: string;
}
// @generated message type with reflection information, may provide speed optimized methods
class AdminPartner$Type extends MessageType<AdminPartner> {
    constructor() {
        super("api.AdminPartner", [
            { no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 3, name: "LegalStructure", kind: "scalar", jsonName: "LegalStructure", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "Address", kind: "message", jsonName: "Address", T: () => Address, options: { "validate.rules": { message: { required: true } } } },
            { no: 5, name: "OrganisationID", kind: "scalar", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 6, name: "ActorIDs", kind: "scalar", jsonName: "ActorIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { unique: true } } } },
            { no: 7, name: "Actors", kind: "message", jsonName: "Actors", repeat: 1 /*RepeatType.PACKED*/, T: () => AdminActor },
            { no: 8, name: "PhotoURI", kind: "scalar", jsonName: "PhotoURI", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"https://reflex-visibility-forever.jpg\"" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ID", "Name", "Address", "OrganisationID"] } } });
    }
    create(value?: PartialMessage<AdminPartner>): AdminPartner {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.iD = "";
        message.name = "";
        message.legalStructure = "";
        message.organisationID = "";
        message.actorIDs = [];
        message.actors = [];
        message.photoURI = "";
        if (value !== undefined)
            reflectionMergePartial<AdminPartner>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdminPartner): AdminPartner {
        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 Name = 2 [json_name = "Name"];*/ 2:
                    message.name = reader.string();
                    break;
                case /* string LegalStructure = 3 [json_name = "LegalStructure"];*/ 3:
                    message.legalStructure = reader.string();
                    break;
                case /* api.Address Address = 4 [json_name = "Address"];*/ 4:
                    message.address = Address.internalBinaryRead(reader, reader.uint32(), options, message.address);
                    break;
                case /* string OrganisationID = 5 [json_name = "OrganisationID"];*/ 5:
                    message.organisationID = reader.string();
                    break;
                case /* repeated string ActorIDs = 6 [json_name = "ActorIDs"];*/ 6:
                    message.actorIDs.push(reader.string());
                    break;
                case /* repeated api.AdminActor Actors = 7 [json_name = "Actors"];*/ 7:
                    message.actors.push(AdminActor.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* string PhotoURI = 8 [json_name = "PhotoURI"];*/ 8:
                    message.photoURI = reader.string();
                    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: AdminPartner, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ID = 1 [json_name = "ID"]; */
        if (message.iD !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.iD);
        /* string Name = 2 [json_name = "Name"]; */
        if (message.name !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.name);
        /* string LegalStructure = 3 [json_name = "LegalStructure"]; */
        if (message.legalStructure !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.legalStructure);
        /* api.Address Address = 4 [json_name = "Address"]; */
        if (message.address)
            Address.internalBinaryWrite(message.address, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* string OrganisationID = 5 [json_name = "OrganisationID"]; */
        if (message.organisationID !== "")
            writer.tag(5, WireType.LengthDelimited).string(message.organisationID);
        /* repeated string ActorIDs = 6 [json_name = "ActorIDs"]; */
        for (let i = 0; i < message.actorIDs.length; i++)
            writer.tag(6, WireType.LengthDelimited).string(message.actorIDs[i]);
        /* repeated api.AdminActor Actors = 7 [json_name = "Actors"]; */
        for (let i = 0; i < message.actors.length; i++)
            AdminActor.internalBinaryWrite(message.actors[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* string PhotoURI = 8 [json_name = "PhotoURI"]; */
        if (message.photoURI !== "")
            writer.tag(8, WireType.LengthDelimited).string(message.photoURI);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.AdminPartner
 */
export const AdminPartner = new AdminPartner$Type();
