// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @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 */ ID: string; /** * @generated from protobuf field: string Name = 2 */ Name: string; /** * @generated from protobuf field: string LegalStructure = 3 */ LegalStructure: string; /** * @generated from protobuf field: api.Address Address = 4 */ Address?: Address; /** * @generated from protobuf field: string OrganisationID = 5 */ OrganisationID: string; /** * In ActorIDs are given / Out not present * * @generated from protobuf field: repeated string ActorIDs = 6 */ ActorIDs: string[]; /** * In not accepted / Out Actors are returned * * @generated from protobuf field: repeated api.AdminActor Actors = 7 */ Actors: AdminActor[]; /** * @generated from protobuf field: string PhotoURI = 8 */ PhotoURI: string; } // @generated message type with reflection information, may provide speed optimized methods class AdminPartner$Type extends MessageType { constructor() { super("api.AdminPartner", [ { no: 1, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 3, name: "LegalStructure", kind: "scalar", localName: "LegalStructure", jsonName: "LegalStructure", T: 9 /*ScalarType.STRING*/ }, { no: 4, name: "Address", kind: "message", localName: "Address", jsonName: "Address", T: () => Address, options: { "validate.rules": { message: { required: true } } } }, { no: 5, name: "OrganisationID", kind: "scalar", localName: "OrganisationID", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 6, name: "ActorIDs", kind: "scalar", localName: "ActorIDs", jsonName: "ActorIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { unique: true } } } }, { no: 7, name: "Actors", kind: "message", localName: "Actors", jsonName: "Actors", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AdminActor }, { no: 8, name: "PhotoURI", kind: "scalar", localName: "PhotoURI", 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 { 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(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: message.ID = reader.string(); break; case /* string Name */ 2: message.Name = reader.string(); break; case /* string LegalStructure */ 3: message.LegalStructure = reader.string(); break; case /* api.Address Address */ 4: message.Address = Address.internalBinaryRead(reader, reader.uint32(), options, message.Address); break; case /* string OrganisationID */ 5: message.OrganisationID = reader.string(); break; case /* repeated string ActorIDs */ 6: message.ActorIDs.push(reader.string()); break; case /* repeated api.AdminActor Actors */ 7: message.Actors.push(AdminActor.internalBinaryRead(reader, reader.uint32(), options)); break; case /* string 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; */ if (message.ID !== "") writer.tag(1, WireType.LengthDelimited).string(message.ID); /* string Name = 2; */ if (message.Name !== "") writer.tag(2, WireType.LengthDelimited).string(message.Name); /* string LegalStructure = 3; */ if (message.LegalStructure !== "") writer.tag(3, WireType.LengthDelimited).string(message.LegalStructure); /* api.Address Address = 4; */ if (message.Address) Address.internalBinaryWrite(message.Address, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* string OrganisationID = 5; */ if (message.OrganisationID !== "") writer.tag(5, WireType.LengthDelimited).string(message.OrganisationID); /* repeated string ActorIDs = 6; */ for (let i = 0; i < message.ActorIDs.length; i++) writer.tag(6, WireType.LengthDelimited).string(message.ActorIDs[i]); /* repeated api.AdminActor Actors = 7; */ 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; */ 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();