// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @generated from protobuf file "rules.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 { EntityType } from "./shared"; // ========== MODEL MESSAGES ========== /** * Rule represents a named business rule applied to a specific entity type within an organisation. * * @generated from protobuf message api.Rule */ export interface Rule { /** * @generated from protobuf field: string ID = 1 */ ID: string; // Unique identifier of the rule. /** * @generated from protobuf field: string OrganisationID = 2 */ OrganisationID: string; // Identifier of the organisation the rule belongs to. /** * @generated from protobuf field: api.EntityType Entity = 3 */ Entity: EntityType; // Entity type the rule applies to (e.g. ORDER, ACTOR). /** * @generated from protobuf field: string Name = 4 */ Name: string; // Human-readable name of the rule. /** * @generated from protobuf field: string Description = 5 */ Description: string; // Optional description providing context for the rule. /** * @generated from protobuf field: string Definition = 6 */ Definition: string; // RPL (Reflex Platform Language) expression defining the rule logic. /** * @generated from protobuf field: api.RuleType RuleType = 7 */ RuleType: RuleType; // Category of the rule, determining how it is enforced. /** * @generated from protobuf field: string RuleTypeID = 8 */ RuleTypeID: string; // ID of the resource this rule is attached to. Its type depends on RuleType (e.g. a RestrictionID for RESTRICTION, a ProjectLifecycle task ID for PRUNE or ANONYMIZE). /** * @generated from protobuf field: bool Status = 9 */ Status: boolean; // Whether the rule is currently active (true = enabled, false = disabled). /** * @generated from protobuf field: repeated string Attributes = 10 */ Attributes: string[]; // Contextual key:value pairs provided by the rule's consumer to scope evaluation (e.g. "ActorID:" used to compute a restriction rule for a given actor context). } // ========== REQUESTS & RESPONSE MESSAGES ========== /** * Create * * @generated from protobuf message api.CreateRuleRequest */ export interface CreateRuleRequest { /** * @generated from protobuf field: string OrganisationID = 1 */ OrganisationID: string; /** * @generated from protobuf field: api.EntityType Entity = 2 */ Entity: EntityType; /** * @generated from protobuf field: string Name = 3 */ Name: string; /** * @generated from protobuf field: api.RuleType RuleType = 4 */ RuleType: RuleType; /** * @generated from protobuf field: string RuleTypeID = 5 */ RuleTypeID: string; /** * @generated from protobuf field: string Description = 6 */ Description: string; /** * @generated from protobuf field: string Definition = 7 */ Definition: string; /** * @generated from protobuf field: string Issuer = 8 */ Issuer: string; // Who created the rule, will be used as the commit's author when pushed to git /** * @generated from protobuf field: repeated string Attributes = 9 */ Attributes: string[]; } /** * @generated from protobuf message api.CreateRuleResponse */ export interface CreateRuleResponse { /** * @generated from protobuf field: api.Rule Rule = 1 */ Rule?: Rule; } /** * Update * * @generated from protobuf message api.UpdateRuleRequest */ export interface UpdateRuleRequest { /** * @generated from protobuf field: string RuleID = 1 */ RuleID: string; /** * @generated from protobuf field: string Name = 2 */ Name: string; /** * @generated from protobuf field: string Description = 3 */ Description: string; /** * @generated from protobuf field: string Definition = 4 */ Definition: string; /** * @generated from protobuf field: api.EntityType Entity = 5 */ Entity: EntityType; /** * @generated from protobuf field: string Issuer = 6 */ Issuer: string; // Who updated the rule, will be used as the commit's author when pushed to git /** * @generated from protobuf field: repeated string Attributes = 7 */ Attributes: string[]; } /** * @generated from protobuf message api.UpdateRuleResponse */ export interface UpdateRuleResponse { /** * @generated from protobuf field: api.Rule Rule = 1 */ Rule?: Rule; } /** * Get * * @generated from protobuf message api.GetRuleRequest */ export interface GetRuleRequest { /** * @generated from protobuf field: string RuleID = 1 */ RuleID: string; } /** * @generated from protobuf message api.GetRuleResponse */ export interface GetRuleResponse { /** * @generated from protobuf field: api.Rule Rule = 1 */ Rule?: Rule; } /** * List * * @generated from protobuf message api.ListRulesRequest */ export interface ListRulesRequest { // Filters /** * @generated from protobuf field: string OrganisationID = 1 */ OrganisationID: string; /** * @generated from protobuf field: api.RuleType RuleType = 2 */ RuleType: RuleType; /** * @generated from protobuf field: string RuleTypeID = 3 */ RuleTypeID: string; /** * @generated from protobuf field: api.EntityType Entity = 4 */ Entity: EntityType; } /** * @generated from protobuf message api.ListRulesResponse */ export interface ListRulesResponse { /** * @generated from protobuf field: repeated api.Rule Rules = 1 */ Rules: Rule[]; } /** * Delete * * @generated from protobuf message api.DeleteRuleRequest */ export interface DeleteRuleRequest { /** * @generated from protobuf field: string RuleID = 1 */ RuleID: string; /** * @generated from protobuf field: string Issuer = 2 */ Issuer: string; // Who updated the rule, will be used as the commit's author when pushed to git } /** * @generated from protobuf message api.DeleteRuleResponse */ export interface DeleteRuleResponse { } /** * Enable * * @generated from protobuf message api.EnableRuleRequest */ export interface EnableRuleRequest { /** * @generated from protobuf field: string RuleID = 1 */ RuleID: string; } /** * @generated from protobuf message api.EnableRuleResponse */ export interface EnableRuleResponse { /** * @generated from protobuf field: api.Rule Rule = 1 */ Rule?: Rule; } /** * Disable * * @generated from protobuf message api.DisableRuleRequest */ export interface DisableRuleRequest { /** * @generated from protobuf field: string RuleID = 1 */ RuleID: string; } /** * @generated from protobuf message api.DisableRuleResponse */ export interface DisableRuleResponse { /** * @generated from protobuf field: api.Rule Rule = 1 */ Rule?: Rule; } /** * GetJSONTree * * @generated from protobuf message api.GetJSONTreeRequest */ export interface GetJSONTreeRequest { /** * @generated from protobuf field: string RuleID = 1 */ RuleID: string; } /** * @generated from protobuf message api.GetJSONTreeResponse */ export interface GetJSONTreeResponse { /** * @generated from protobuf field: string JSONTree = 1 */ JSONTree: string; } /** * RuleType categorises rules by their enforcement behaviour within a project. * * @generated from protobuf enum api.RuleType */ export enum RuleType { /** * Default unset value. Should not be used explicitly. * * @generated from protobuf enum value: RULE_TYPE_PROJECT_UNKNOWN = 0; */ RULE_TYPE_PROJECT_UNKNOWN = 0, /** * Data-access restriction: filters which data a user or role can see. * * @generated from protobuf enum value: RULE_TYPE_PROJECT_RESTRICTION = 1; */ RULE_TYPE_PROJECT_RESTRICTION = 1, /** * Prune: removes or archives entities based on defined conditions. * * @generated from protobuf enum value: RULE_TYPE_PROJECT_PRUNE = 2; */ RULE_TYPE_PROJECT_PRUNE = 2, /** * Anonymize: masks or anonymizes entity data based on defined conditions. * * @generated from protobuf enum value: RULE_TYPE_PROJECT_ANONYMIZE = 3; */ RULE_TYPE_PROJECT_ANONYMIZE = 3 } // @generated message type with reflection information, may provide speed optimized methods class Rule$Type extends MessageType { constructor() { super("api.Rule", [ { no: 1, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "OrganisationID", kind: "scalar", localName: "OrganisationID", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType] }, { no: 4, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ }, { no: 5, name: "Description", kind: "scalar", localName: "Description", jsonName: "Description", T: 9 /*ScalarType.STRING*/ }, { no: 6, name: "Definition", kind: "scalar", localName: "Definition", jsonName: "Definition", T: 9 /*ScalarType.STRING*/ }, { no: 7, name: "RuleType", kind: "enum", localName: "RuleType", jsonName: "RuleType", T: () => ["api.RuleType", RuleType] }, { no: 8, name: "RuleTypeID", kind: "scalar", localName: "RuleTypeID", jsonName: "RuleTypeID", T: 9 /*ScalarType.STRING*/ }, { no: 9, name: "Status", kind: "scalar", localName: "Status", jsonName: "Status", T: 8 /*ScalarType.BOOL*/ }, { no: 10, name: "Attributes", kind: "scalar", localName: "Attributes", jsonName: "Attributes", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): Rule { const message = globalThis.Object.create((this.messagePrototype!)); message.ID = ""; message.OrganisationID = ""; message.Entity = 0; message.Name = ""; message.Description = ""; message.Definition = ""; message.RuleType = 0; message.RuleTypeID = ""; message.Status = false; message.Attributes = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Rule): Rule { 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 OrganisationID */ 2: message.OrganisationID = reader.string(); break; case /* api.EntityType Entity */ 3: message.Entity = reader.int32(); break; case /* string Name */ 4: message.Name = reader.string(); break; case /* string Description */ 5: message.Description = reader.string(); break; case /* string Definition */ 6: message.Definition = reader.string(); break; case /* api.RuleType RuleType */ 7: message.RuleType = reader.int32(); break; case /* string RuleTypeID */ 8: message.RuleTypeID = reader.string(); break; case /* bool Status */ 9: message.Status = reader.bool(); break; case /* repeated string Attributes */ 10: message.Attributes.push(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: Rule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string ID = 1; */ if (message.ID !== "") writer.tag(1, WireType.LengthDelimited).string(message.ID); /* string OrganisationID = 2; */ if (message.OrganisationID !== "") writer.tag(2, WireType.LengthDelimited).string(message.OrganisationID); /* api.EntityType Entity = 3; */ if (message.Entity !== 0) writer.tag(3, WireType.Varint).int32(message.Entity); /* string Name = 4; */ if (message.Name !== "") writer.tag(4, WireType.LengthDelimited).string(message.Name); /* string Description = 5; */ if (message.Description !== "") writer.tag(5, WireType.LengthDelimited).string(message.Description); /* string Definition = 6; */ if (message.Definition !== "") writer.tag(6, WireType.LengthDelimited).string(message.Definition); /* api.RuleType RuleType = 7; */ if (message.RuleType !== 0) writer.tag(7, WireType.Varint).int32(message.RuleType); /* string RuleTypeID = 8; */ if (message.RuleTypeID !== "") writer.tag(8, WireType.LengthDelimited).string(message.RuleTypeID); /* bool Status = 9; */ if (message.Status !== false) writer.tag(9, WireType.Varint).bool(message.Status); /* repeated string Attributes = 10; */ for (let i = 0; i < message.Attributes.length; i++) writer.tag(10, WireType.LengthDelimited).string(message.Attributes[i]); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.Rule */ export const Rule = new Rule$Type(); // @generated message type with reflection information, may provide speed optimized methods class CreateRuleRequest$Type extends MessageType { constructor() { super("api.CreateRuleRequest", [ { no: 1, name: "OrganisationID", kind: "scalar", localName: "OrganisationID", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 2, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "validate.rules": { enum: { definedOnly: true } } } }, { no: 3, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 4, name: "RuleType", kind: "enum", localName: "RuleType", jsonName: "RuleType", T: () => ["api.RuleType", RuleType], options: { "validate.rules": { enum: { definedOnly: true } } } }, { no: 5, name: "RuleTypeID", kind: "scalar", localName: "RuleTypeID", jsonName: "RuleTypeID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 6, name: "Description", kind: "scalar", localName: "Description", jsonName: "Description", T: 9 /*ScalarType.STRING*/ }, { no: 7, name: "Definition", kind: "scalar", localName: "Definition", jsonName: "Definition", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 8, name: "Issuer", kind: "scalar", localName: "Issuer", jsonName: "Issuer", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 9, name: "Attributes", kind: "scalar", localName: "Attributes", jsonName: "Attributes", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["OrganisationID", "Entity", "Name", "RuleType", "RuleTypeID", "Definition", "Issuer"] } } }); } create(value?: PartialMessage): CreateRuleRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.OrganisationID = ""; message.Entity = 0; message.Name = ""; message.RuleType = 0; message.RuleTypeID = ""; message.Description = ""; message.Definition = ""; message.Issuer = ""; message.Attributes = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateRuleRequest): CreateRuleRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string OrganisationID */ 1: message.OrganisationID = reader.string(); break; case /* api.EntityType Entity */ 2: message.Entity = reader.int32(); break; case /* string Name */ 3: message.Name = reader.string(); break; case /* api.RuleType RuleType */ 4: message.RuleType = reader.int32(); break; case /* string RuleTypeID */ 5: message.RuleTypeID = reader.string(); break; case /* string Description */ 6: message.Description = reader.string(); break; case /* string Definition */ 7: message.Definition = reader.string(); break; case /* string Issuer */ 8: message.Issuer = reader.string(); break; case /* repeated string Attributes */ 9: message.Attributes.push(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: CreateRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string OrganisationID = 1; */ if (message.OrganisationID !== "") writer.tag(1, WireType.LengthDelimited).string(message.OrganisationID); /* api.EntityType Entity = 2; */ if (message.Entity !== 0) writer.tag(2, WireType.Varint).int32(message.Entity); /* string Name = 3; */ if (message.Name !== "") writer.tag(3, WireType.LengthDelimited).string(message.Name); /* api.RuleType RuleType = 4; */ if (message.RuleType !== 0) writer.tag(4, WireType.Varint).int32(message.RuleType); /* string RuleTypeID = 5; */ if (message.RuleTypeID !== "") writer.tag(5, WireType.LengthDelimited).string(message.RuleTypeID); /* string Description = 6; */ if (message.Description !== "") writer.tag(6, WireType.LengthDelimited).string(message.Description); /* string Definition = 7; */ if (message.Definition !== "") writer.tag(7, WireType.LengthDelimited).string(message.Definition); /* string Issuer = 8; */ if (message.Issuer !== "") writer.tag(8, WireType.LengthDelimited).string(message.Issuer); /* repeated string Attributes = 9; */ for (let i = 0; i < message.Attributes.length; i++) writer.tag(9, WireType.LengthDelimited).string(message.Attributes[i]); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.CreateRuleRequest */ export const CreateRuleRequest = new CreateRuleRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class CreateRuleResponse$Type extends MessageType { constructor() { super("api.CreateRuleResponse", [ { no: 1, name: "Rule", kind: "message", localName: "Rule", jsonName: "Rule", T: () => Rule } ]); } create(value?: PartialMessage): CreateRuleResponse { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateRuleResponse): CreateRuleResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.Rule Rule */ 1: message.Rule = Rule.internalBinaryRead(reader, reader.uint32(), options, message.Rule); 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: CreateRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.Rule Rule = 1; */ if (message.Rule) Rule.internalBinaryWrite(message.Rule, 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.CreateRuleResponse */ export const CreateRuleResponse = new CreateRuleResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class UpdateRuleRequest$Type extends MessageType { constructor() { super("api.UpdateRuleRequest", [ { no: 1, name: "RuleID", kind: "scalar", localName: "RuleID", jsonName: "RuleID", 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: "Description", kind: "scalar", localName: "Description", jsonName: "Description", T: 9 /*ScalarType.STRING*/ }, { no: 4, name: "Definition", kind: "scalar", localName: "Definition", jsonName: "Definition", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 5, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "validate.rules": { enum: { definedOnly: true } } } }, { no: 6, name: "Issuer", kind: "scalar", localName: "Issuer", jsonName: "Issuer", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 7, name: "Attributes", kind: "scalar", localName: "Attributes", jsonName: "Attributes", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RuleID", "Name", "Definition", "Issuer", "Entity"] } } }); } create(value?: PartialMessage): UpdateRuleRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.RuleID = ""; message.Name = ""; message.Description = ""; message.Definition = ""; message.Entity = 0; message.Issuer = ""; message.Attributes = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateRuleRequest): UpdateRuleRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string RuleID */ 1: message.RuleID = reader.string(); break; case /* string Name */ 2: message.Name = reader.string(); break; case /* string Description */ 3: message.Description = reader.string(); break; case /* string Definition */ 4: message.Definition = reader.string(); break; case /* api.EntityType Entity */ 5: message.Entity = reader.int32(); break; case /* string Issuer */ 6: message.Issuer = reader.string(); break; case /* repeated string Attributes */ 7: message.Attributes.push(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: UpdateRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string RuleID = 1; */ if (message.RuleID !== "") writer.tag(1, WireType.LengthDelimited).string(message.RuleID); /* string Name = 2; */ if (message.Name !== "") writer.tag(2, WireType.LengthDelimited).string(message.Name); /* string Description = 3; */ if (message.Description !== "") writer.tag(3, WireType.LengthDelimited).string(message.Description); /* string Definition = 4; */ if (message.Definition !== "") writer.tag(4, WireType.LengthDelimited).string(message.Definition); /* api.EntityType Entity = 5; */ if (message.Entity !== 0) writer.tag(5, WireType.Varint).int32(message.Entity); /* string Issuer = 6; */ if (message.Issuer !== "") writer.tag(6, WireType.LengthDelimited).string(message.Issuer); /* repeated string Attributes = 7; */ for (let i = 0; i < message.Attributes.length; i++) writer.tag(7, WireType.LengthDelimited).string(message.Attributes[i]); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.UpdateRuleRequest */ export const UpdateRuleRequest = new UpdateRuleRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class UpdateRuleResponse$Type extends MessageType { constructor() { super("api.UpdateRuleResponse", [ { no: 1, name: "Rule", kind: "message", localName: "Rule", jsonName: "Rule", T: () => Rule } ]); } create(value?: PartialMessage): UpdateRuleResponse { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateRuleResponse): UpdateRuleResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.Rule Rule */ 1: message.Rule = Rule.internalBinaryRead(reader, reader.uint32(), options, message.Rule); 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: UpdateRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.Rule Rule = 1; */ if (message.Rule) Rule.internalBinaryWrite(message.Rule, 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.UpdateRuleResponse */ export const UpdateRuleResponse = new UpdateRuleResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class GetRuleRequest$Type extends MessageType { constructor() { super("api.GetRuleRequest", [ { no: 1, name: "RuleID", kind: "scalar", localName: "RuleID", jsonName: "RuleID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RuleID"] } } }); } create(value?: PartialMessage): GetRuleRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.RuleID = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetRuleRequest): GetRuleRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string RuleID */ 1: message.RuleID = 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: GetRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string RuleID = 1; */ if (message.RuleID !== "") writer.tag(1, WireType.LengthDelimited).string(message.RuleID); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.GetRuleRequest */ export const GetRuleRequest = new GetRuleRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class GetRuleResponse$Type extends MessageType { constructor() { super("api.GetRuleResponse", [ { no: 1, name: "Rule", kind: "message", localName: "Rule", jsonName: "Rule", T: () => Rule } ]); } create(value?: PartialMessage): GetRuleResponse { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetRuleResponse): GetRuleResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.Rule Rule */ 1: message.Rule = Rule.internalBinaryRead(reader, reader.uint32(), options, message.Rule); 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: GetRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.Rule Rule = 1; */ if (message.Rule) Rule.internalBinaryWrite(message.Rule, 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.GetRuleResponse */ export const GetRuleResponse = new GetRuleResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class ListRulesRequest$Type extends MessageType { constructor() { super("api.ListRulesRequest", [ { no: 1, name: "OrganisationID", kind: "scalar", localName: "OrganisationID", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "RuleType", kind: "enum", localName: "RuleType", jsonName: "RuleType", T: () => ["api.RuleType", RuleType] }, { no: 3, name: "RuleTypeID", kind: "scalar", localName: "RuleTypeID", jsonName: "RuleTypeID", T: 9 /*ScalarType.STRING*/ }, { no: 4, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType] } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: {} } }); } create(value?: PartialMessage): ListRulesRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.OrganisationID = ""; message.RuleType = 0; message.RuleTypeID = ""; message.Entity = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListRulesRequest): ListRulesRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string OrganisationID */ 1: message.OrganisationID = reader.string(); break; case /* api.RuleType RuleType */ 2: message.RuleType = reader.int32(); break; case /* string RuleTypeID */ 3: message.RuleTypeID = reader.string(); break; case /* api.EntityType Entity */ 4: message.Entity = 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: ListRulesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string OrganisationID = 1; */ if (message.OrganisationID !== "") writer.tag(1, WireType.LengthDelimited).string(message.OrganisationID); /* api.RuleType RuleType = 2; */ if (message.RuleType !== 0) writer.tag(2, WireType.Varint).int32(message.RuleType); /* string RuleTypeID = 3; */ if (message.RuleTypeID !== "") writer.tag(3, WireType.LengthDelimited).string(message.RuleTypeID); /* api.EntityType Entity = 4; */ if (message.Entity !== 0) writer.tag(4, WireType.Varint).int32(message.Entity); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.ListRulesRequest */ export const ListRulesRequest = new ListRulesRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class ListRulesResponse$Type extends MessageType { constructor() { super("api.ListRulesResponse", [ { no: 1, name: "Rules", kind: "message", localName: "Rules", jsonName: "Rules", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Rule } ]); } create(value?: PartialMessage): ListRulesResponse { const message = globalThis.Object.create((this.messagePrototype!)); message.Rules = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListRulesResponse): ListRulesResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated api.Rule Rules */ 1: message.Rules.push(Rule.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: ListRulesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated api.Rule Rules = 1; */ for (let i = 0; i < message.Rules.length; i++) Rule.internalBinaryWrite(message.Rules[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.ListRulesResponse */ export const ListRulesResponse = new ListRulesResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class DeleteRuleRequest$Type extends MessageType { constructor() { super("api.DeleteRuleRequest", [ { no: 1, name: "RuleID", kind: "scalar", localName: "RuleID", jsonName: "RuleID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 2, name: "Issuer", kind: "scalar", localName: "Issuer", jsonName: "Issuer", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RuleID", "Issuer"] } } }); } create(value?: PartialMessage): DeleteRuleRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.RuleID = ""; message.Issuer = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRuleRequest): DeleteRuleRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string RuleID */ 1: message.RuleID = reader.string(); break; case /* string Issuer */ 2: message.Issuer = 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: DeleteRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string RuleID = 1; */ if (message.RuleID !== "") writer.tag(1, WireType.LengthDelimited).string(message.RuleID); /* string Issuer = 2; */ if (message.Issuer !== "") writer.tag(2, WireType.LengthDelimited).string(message.Issuer); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.DeleteRuleRequest */ export const DeleteRuleRequest = new DeleteRuleRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class DeleteRuleResponse$Type extends MessageType { constructor() { super("api.DeleteRuleResponse", []); } create(value?: PartialMessage): DeleteRuleResponse { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteRuleResponse): DeleteRuleResponse { 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: DeleteRuleResponse, 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.DeleteRuleResponse */ export const DeleteRuleResponse = new DeleteRuleResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class EnableRuleRequest$Type extends MessageType { constructor() { super("api.EnableRuleRequest", [ { no: 1, name: "RuleID", kind: "scalar", localName: "RuleID", jsonName: "RuleID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RuleID"] } } }); } create(value?: PartialMessage): EnableRuleRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.RuleID = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnableRuleRequest): EnableRuleRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string RuleID */ 1: message.RuleID = 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: EnableRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string RuleID = 1; */ if (message.RuleID !== "") writer.tag(1, WireType.LengthDelimited).string(message.RuleID); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.EnableRuleRequest */ export const EnableRuleRequest = new EnableRuleRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class EnableRuleResponse$Type extends MessageType { constructor() { super("api.EnableRuleResponse", [ { no: 1, name: "Rule", kind: "message", localName: "Rule", jsonName: "Rule", T: () => Rule } ]); } create(value?: PartialMessage): EnableRuleResponse { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnableRuleResponse): EnableRuleResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.Rule Rule */ 1: message.Rule = Rule.internalBinaryRead(reader, reader.uint32(), options, message.Rule); 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: EnableRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.Rule Rule = 1; */ if (message.Rule) Rule.internalBinaryWrite(message.Rule, 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.EnableRuleResponse */ export const EnableRuleResponse = new EnableRuleResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class DisableRuleRequest$Type extends MessageType { constructor() { super("api.DisableRuleRequest", [ { no: 1, name: "RuleID", kind: "scalar", localName: "RuleID", jsonName: "RuleID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RuleID"] } } }); } create(value?: PartialMessage): DisableRuleRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.RuleID = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DisableRuleRequest): DisableRuleRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string RuleID */ 1: message.RuleID = 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: DisableRuleRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string RuleID = 1; */ if (message.RuleID !== "") writer.tag(1, WireType.LengthDelimited).string(message.RuleID); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.DisableRuleRequest */ export const DisableRuleRequest = new DisableRuleRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class DisableRuleResponse$Type extends MessageType { constructor() { super("api.DisableRuleResponse", [ { no: 1, name: "Rule", kind: "message", localName: "Rule", jsonName: "Rule", T: () => Rule } ]); } create(value?: PartialMessage): DisableRuleResponse { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DisableRuleResponse): DisableRuleResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.Rule Rule */ 1: message.Rule = Rule.internalBinaryRead(reader, reader.uint32(), options, message.Rule); 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: DisableRuleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.Rule Rule = 1; */ if (message.Rule) Rule.internalBinaryWrite(message.Rule, 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.DisableRuleResponse */ export const DisableRuleResponse = new DisableRuleResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods class GetJSONTreeRequest$Type extends MessageType { constructor() { super("api.GetJSONTreeRequest", [ { no: 1, name: "RuleID", kind: "scalar", localName: "RuleID", jsonName: "RuleID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RuleID"] } } }); } create(value?: PartialMessage): GetJSONTreeRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.RuleID = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetJSONTreeRequest): GetJSONTreeRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string RuleID */ 1: message.RuleID = 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: GetJSONTreeRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string RuleID = 1; */ if (message.RuleID !== "") writer.tag(1, WireType.LengthDelimited).string(message.RuleID); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.GetJSONTreeRequest */ export const GetJSONTreeRequest = new GetJSONTreeRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class GetJSONTreeResponse$Type extends MessageType { constructor() { super("api.GetJSONTreeResponse", [ { no: 1, name: "JSONTree", kind: "scalar", localName: "JSONTree", jsonName: "JSONTree", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): GetJSONTreeResponse { const message = globalThis.Object.create((this.messagePrototype!)); message.JSONTree = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetJSONTreeResponse): GetJSONTreeResponse { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string JSONTree */ 1: message.JSONTree = 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: GetJSONTreeResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string JSONTree = 1; */ if (message.JSONTree !== "") writer.tag(1, WireType.LengthDelimited).string(message.JSONTree); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.GetJSONTreeResponse */ export const GetJSONTreeResponse = new GetJSONTreeResponse$Type(); /** * @generated ServiceType for protobuf service api.RuleService */ export const RuleService = new ServiceType("api.RuleService", [ { name: "Create", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Rule"], description: "Create a rule" }, "api.rscType": "Platform", "api.roles": "Platform.Rule", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateRuleRequest, O: CreateRuleResponse }, { name: "Update", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Rule"], description: "Update a rule" }, "api.rscType": "Platform", "api.roles": "Platform.Rule", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: UpdateRuleRequest, O: UpdateRuleResponse }, { name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Rule"], description: "Get a rule" }, "api.rscType": "Platform", "api.roles": "Platform.Rule", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: GetRuleRequest, O: GetRuleResponse }, { name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Rule"], description: "List rules" }, "api.rscType": "Platform", "api.roles": "Platform.Rule", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: ListRulesRequest, O: ListRulesResponse }, { name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Rule"], description: "Delete a rule" }, "api.rscType": "Platform", "api.roles": "Platform.Rule", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteRuleRequest, O: DeleteRuleResponse }, { name: "Enable", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Rule"], description: "Enable a rule" }, "api.rscType": "Platform", "api.roles": "Platform.Rule", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: EnableRuleRequest, O: EnableRuleResponse }, { name: "Disable", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Rule"], description: "Disable a rule" }, "api.rscType": "Platform", "api.roles": "Platform.Rule", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DisableRuleRequest, O: DisableRuleResponse }, { name: "GetJSONTree", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Rule"], description: "Get the JSON tree of a rule when compiled" }, "api.rscType": "Platform", "api.roles": "Platform.Rule", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: GetJSONTreeRequest, O: GetJSONTreeResponse } ], { "api.k8sService": "rule-server" });