// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "base.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";
/**
 * @generated from protobuf message api.AdminAddress
 */
export interface AdminAddress {
    /**
     * @generated from protobuf field: string City = 1 [json_name = "City"];
     */
    city: string;
    /**
     * Country Code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1'>ISO_3166-1</a> format
     *
     * @generated from protobuf field: string CountryCode = 2 [json_name = "CountryCode"];
     */
    countryCode: string;
    /**
     * @generated from protobuf field: api.AdminGeographicalCoordinates GeographicalCoordinates = 3 [json_name = "GeographicalCoordinates"];
     */
    geographicalCoordinates?: AdminGeographicalCoordinates;
    /**
     * @generated from protobuf field: string Name = 4 [json_name = "Name"];
     */
    name: string;
    /**
     * @generated from protobuf field: string POBoxNumber = 5 [json_name = "POBoxNumber"];
     */
    pOBoxNumber: string;
    /**
     * @generated from protobuf field: string PostalCode = 6 [json_name = "PostalCode"];
     */
    postalCode: string;
    /**
     * @generated from protobuf field: string ProvinceCode = 7 [json_name = "ProvinceCode"];
     */
    provinceCode: string;
    /**
     * @generated from protobuf field: string State = 8 [json_name = "State"];
     */
    state: string;
    /**
     * @generated from protobuf field: string StreetAddressOne = 9 [json_name = "StreetAddressOne"];
     */
    streetAddressOne: string;
    /**
     * @generated from protobuf field: string StreetAddressTwo = 10 [json_name = "StreetAddressTwo"];
     */
    streetAddressTwo: string;
    /**
     * @generated from protobuf field: string StreetAddressThree = 11 [json_name = "StreetAddressThree"];
     */
    streetAddressThree: string;
    /**
     * @generated from protobuf field: string PlusCode = 12 [json_name = "PlusCode"];
     */
    plusCode: string;
}
/**
 *
 * Geographical coordinates information
 *
 * @generated from protobuf message api.AdminGeographicalCoordinates
 */
export interface AdminGeographicalCoordinates {
    /**
     * @generated from protobuf field: string Latitude = 1 [json_name = "Latitude"];
     */
    latitude: string;
    /**
     * @generated from protobuf field: string Longitude = 2 [json_name = "Longitude"];
     */
    longitude: string;
}
/**
 * @generated from protobuf message api.Paging
 */
export interface Paging {
    /**
     * @generated from protobuf field: int32 Limit = 1 [json_name = "Limit"];
     */
    limit: number;
    /**
     * @generated from protobuf field: int32 Offset = 2 [json_name = "Offset"];
     */
    offset: number;
}
// @generated message type with reflection information, may provide speed optimized methods
class AdminAddress$Type extends MessageType<AdminAddress> {
    constructor() {
        super("api.AdminAddress", [
            { no: 1, name: "City", kind: "scalar", jsonName: "City", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "CountryCode", kind: "scalar", jsonName: "CountryCode", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { countryCodeIso3166: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Country Code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1'>ISO_3166-1</a> format", example: "[\"FR\", \"FRA\", \"250\"]" } } },
            { no: 3, name: "GeographicalCoordinates", kind: "message", jsonName: "GeographicalCoordinates", T: () => AdminGeographicalCoordinates },
            { no: 4, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
            { no: 5, name: "POBoxNumber", kind: "scalar", jsonName: "POBoxNumber", T: 9 /*ScalarType.STRING*/ },
            { no: 6, name: "PostalCode", kind: "scalar", jsonName: "PostalCode", T: 9 /*ScalarType.STRING*/ },
            { no: 7, name: "ProvinceCode", kind: "scalar", jsonName: "ProvinceCode", T: 9 /*ScalarType.STRING*/ },
            { no: 8, name: "State", kind: "scalar", jsonName: "State", T: 9 /*ScalarType.STRING*/ },
            { no: 9, name: "StreetAddressOne", kind: "scalar", jsonName: "StreetAddressOne", T: 9 /*ScalarType.STRING*/ },
            { no: 10, name: "StreetAddressTwo", kind: "scalar", jsonName: "StreetAddressTwo", T: 9 /*ScalarType.STRING*/ },
            { no: 11, name: "StreetAddressThree", kind: "scalar", jsonName: "StreetAddressThree", T: 9 /*ScalarType.STRING*/ },
            { no: 12, name: "PlusCode", kind: "scalar", jsonName: "PlusCode", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<AdminAddress>): AdminAddress {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.city = "";
        message.countryCode = "";
        message.name = "";
        message.pOBoxNumber = "";
        message.postalCode = "";
        message.provinceCode = "";
        message.state = "";
        message.streetAddressOne = "";
        message.streetAddressTwo = "";
        message.streetAddressThree = "";
        message.plusCode = "";
        if (value !== undefined)
            reflectionMergePartial<AdminAddress>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdminAddress): AdminAddress {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string City = 1 [json_name = "City"];*/ 1:
                    message.city = reader.string();
                    break;
                case /* string CountryCode = 2 [json_name = "CountryCode"];*/ 2:
                    message.countryCode = reader.string();
                    break;
                case /* api.AdminGeographicalCoordinates GeographicalCoordinates = 3 [json_name = "GeographicalCoordinates"];*/ 3:
                    message.geographicalCoordinates = AdminGeographicalCoordinates.internalBinaryRead(reader, reader.uint32(), options, message.geographicalCoordinates);
                    break;
                case /* string Name = 4 [json_name = "Name"];*/ 4:
                    message.name = reader.string();
                    break;
                case /* string POBoxNumber = 5 [json_name = "POBoxNumber"];*/ 5:
                    message.pOBoxNumber = reader.string();
                    break;
                case /* string PostalCode = 6 [json_name = "PostalCode"];*/ 6:
                    message.postalCode = reader.string();
                    break;
                case /* string ProvinceCode = 7 [json_name = "ProvinceCode"];*/ 7:
                    message.provinceCode = reader.string();
                    break;
                case /* string State = 8 [json_name = "State"];*/ 8:
                    message.state = reader.string();
                    break;
                case /* string StreetAddressOne = 9 [json_name = "StreetAddressOne"];*/ 9:
                    message.streetAddressOne = reader.string();
                    break;
                case /* string StreetAddressTwo = 10 [json_name = "StreetAddressTwo"];*/ 10:
                    message.streetAddressTwo = reader.string();
                    break;
                case /* string StreetAddressThree = 11 [json_name = "StreetAddressThree"];*/ 11:
                    message.streetAddressThree = reader.string();
                    break;
                case /* string PlusCode = 12 [json_name = "PlusCode"];*/ 12:
                    message.plusCode = 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: AdminAddress, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string City = 1 [json_name = "City"]; */
        if (message.city !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.city);
        /* string CountryCode = 2 [json_name = "CountryCode"]; */
        if (message.countryCode !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.countryCode);
        /* api.AdminGeographicalCoordinates GeographicalCoordinates = 3 [json_name = "GeographicalCoordinates"]; */
        if (message.geographicalCoordinates)
            AdminGeographicalCoordinates.internalBinaryWrite(message.geographicalCoordinates, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* string Name = 4 [json_name = "Name"]; */
        if (message.name !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.name);
        /* string POBoxNumber = 5 [json_name = "POBoxNumber"]; */
        if (message.pOBoxNumber !== "")
            writer.tag(5, WireType.LengthDelimited).string(message.pOBoxNumber);
        /* string PostalCode = 6 [json_name = "PostalCode"]; */
        if (message.postalCode !== "")
            writer.tag(6, WireType.LengthDelimited).string(message.postalCode);
        /* string ProvinceCode = 7 [json_name = "ProvinceCode"]; */
        if (message.provinceCode !== "")
            writer.tag(7, WireType.LengthDelimited).string(message.provinceCode);
        /* string State = 8 [json_name = "State"]; */
        if (message.state !== "")
            writer.tag(8, WireType.LengthDelimited).string(message.state);
        /* string StreetAddressOne = 9 [json_name = "StreetAddressOne"]; */
        if (message.streetAddressOne !== "")
            writer.tag(9, WireType.LengthDelimited).string(message.streetAddressOne);
        /* string StreetAddressTwo = 10 [json_name = "StreetAddressTwo"]; */
        if (message.streetAddressTwo !== "")
            writer.tag(10, WireType.LengthDelimited).string(message.streetAddressTwo);
        /* string StreetAddressThree = 11 [json_name = "StreetAddressThree"]; */
        if (message.streetAddressThree !== "")
            writer.tag(11, WireType.LengthDelimited).string(message.streetAddressThree);
        /* string PlusCode = 12 [json_name = "PlusCode"]; */
        if (message.plusCode !== "")
            writer.tag(12, WireType.LengthDelimited).string(message.plusCode);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.AdminAddress
 */
export const AdminAddress = new AdminAddress$Type();
// @generated message type with reflection information, may provide speed optimized methods
class AdminGeographicalCoordinates$Type extends MessageType<AdminGeographicalCoordinates> {
    constructor() {
        super("api.AdminGeographicalCoordinates", [
            { no: 1, name: "Latitude", kind: "scalar", jsonName: "Latitude", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "Longitude", kind: "scalar", jsonName: "Longitude", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<AdminGeographicalCoordinates>): AdminGeographicalCoordinates {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.latitude = "";
        message.longitude = "";
        if (value !== undefined)
            reflectionMergePartial<AdminGeographicalCoordinates>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdminGeographicalCoordinates): AdminGeographicalCoordinates {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string Latitude = 1 [json_name = "Latitude"];*/ 1:
                    message.latitude = reader.string();
                    break;
                case /* string Longitude = 2 [json_name = "Longitude"];*/ 2:
                    message.longitude = 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: AdminGeographicalCoordinates, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string Latitude = 1 [json_name = "Latitude"]; */
        if (message.latitude !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.latitude);
        /* string Longitude = 2 [json_name = "Longitude"]; */
        if (message.longitude !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.longitude);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.AdminGeographicalCoordinates
 */
export const AdminGeographicalCoordinates = new AdminGeographicalCoordinates$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Paging$Type extends MessageType<Paging> {
    constructor() {
        super("api.Paging", [
            { no: 1, name: "Limit", kind: "scalar", jsonName: "Limit", T: 5 /*ScalarType.INT32*/ },
            { no: 2, name: "Offset", kind: "scalar", jsonName: "Offset", T: 5 /*ScalarType.INT32*/ }
        ]);
    }
    create(value?: PartialMessage<Paging>): Paging {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.limit = 0;
        message.offset = 0;
        if (value !== undefined)
            reflectionMergePartial<Paging>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Paging): Paging {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* int32 Limit = 1 [json_name = "Limit"];*/ 1:
                    message.limit = reader.int32();
                    break;
                case /* int32 Offset = 2 [json_name = "Offset"];*/ 2:
                    message.offset = reader.int32();
                    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: Paging, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* int32 Limit = 1 [json_name = "Limit"]; */
        if (message.limit !== 0)
            writer.tag(1, WireType.Varint).int32(message.limit);
        /* int32 Offset = 2 [json_name = "Offset"]; */
        if (message.offset !== 0)
            writer.tag(2, WireType.Varint).int32(message.offset);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.Paging
 */
export const Paging = new Paging$Type();
