// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @generated from protobuf file "admin-actor.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 { ActorTypology } from "./repositoryShared"; import { ActorContact } from "./repositoryShared"; import { Address } from "./repositoryShared"; /** * @generated from protobuf message api.AdminActor */ export interface AdminActor { /** * @generated from protobuf field: string ID = 1 */ ID: string; /** * @generated from protobuf field: string Name = 2 */ Name: string; /** * @generated from protobuf field: string OrganisationID = 3 */ OrganisationID: string; /** * @generated from protobuf field: string PartnerID = 4 */ PartnerID: string; // string AdditionalInformations = 5; /** * @generated from protobuf field: api.Address Address = 6 */ Address?: Address; /** * @generated from protobuf field: api.ActorContact Contact = 7 */ Contact?: ActorContact; /** * @generated from protobuf field: api.ActorTypology Typology = 8 */ Typology: ActorTypology; /** * @generated from protobuf field: string AdditionalInformation = 9 */ AdditionalInformation: string; } // @generated message type with reflection information, may provide speed optimized methods class AdminActor$Type extends MessageType { constructor() { super("api.AdminActor", [ { 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: "OrganisationID", kind: "scalar", localName: "OrganisationID", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 4, name: "PartnerID", kind: "scalar", localName: "PartnerID", jsonName: "PartnerID", T: 9 /*ScalarType.STRING*/ }, { no: 6, name: "Address", kind: "message", localName: "Address", jsonName: "Address", T: () => Address, options: { "validate.rules": { message: { required: true } } } }, { no: 7, name: "Contact", kind: "message", localName: "Contact", jsonName: "Contact", T: () => ActorContact, options: { "validate.rules": { message: { required: true } } } }, { no: 8, name: "Typology", kind: "enum", localName: "Typology", jsonName: "Typology", T: () => ["api.ActorTypology", ActorTypology] }, { no: 9, name: "AdditionalInformation", kind: "scalar", localName: "AdditionalInformation", jsonName: "AdditionalInformation", T: 9 /*ScalarType.STRING*/ } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ID", "Name", "OrganisationID"] } } }); } create(value?: PartialMessage): AdminActor { const message = globalThis.Object.create((this.messagePrototype!)); message.ID = ""; message.Name = ""; message.OrganisationID = ""; message.PartnerID = ""; message.Typology = 0; message.AdditionalInformation = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdminActor): AdminActor { 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 OrganisationID */ 3: message.OrganisationID = reader.string(); break; case /* string PartnerID */ 4: message.PartnerID = reader.string(); break; case /* api.Address Address */ 6: message.Address = Address.internalBinaryRead(reader, reader.uint32(), options, message.Address); break; case /* api.ActorContact Contact */ 7: message.Contact = ActorContact.internalBinaryRead(reader, reader.uint32(), options, message.Contact); break; case /* api.ActorTypology Typology */ 8: message.Typology = reader.int32(); break; case /* string AdditionalInformation */ 9: message.AdditionalInformation = 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: AdminActor, 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 OrganisationID = 3; */ if (message.OrganisationID !== "") writer.tag(3, WireType.LengthDelimited).string(message.OrganisationID); /* string PartnerID = 4; */ if (message.PartnerID !== "") writer.tag(4, WireType.LengthDelimited).string(message.PartnerID); /* api.Address Address = 6; */ if (message.Address) Address.internalBinaryWrite(message.Address, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); /* api.ActorContact Contact = 7; */ if (message.Contact) ActorContact.internalBinaryWrite(message.Contact, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); /* api.ActorTypology Typology = 8; */ if (message.Typology !== 0) writer.tag(8, WireType.Varint).int32(message.Typology); /* string AdditionalInformation = 9; */ if (message.AdditionalInformation !== "") writer.tag(9, WireType.LengthDelimited).string(message.AdditionalInformation); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.AdminActor */ export const AdminActor = new AdminActor$Type();