// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name // @generated from protobuf file "google/rpc/error_details.proto" (package "google.rpc", syntax proto3) // tslint:disable // // Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // 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 { Duration } from "../protobuf/duration"; /** * Describes when the clients can retry a failed request. Clients could ignore * the recommendation here or retry when this information is missing from error * responses. * * It's always recommended that clients should use exponential backoff when * retrying. * * Clients should wait until `retry_delay` amount of time has passed since * receiving the error response before retrying. If retrying requests also * fail, clients should use an exponential backoff scheme to gradually increase * the delay between retries based on `retry_delay`, until either a maximum * number of retires have been reached or a maximum retry delay cap has been * reached. * * @generated from protobuf message google.rpc.RetryInfo */ export interface RetryInfo { /** * Clients should wait at least this long between retrying the same request. * * @generated from protobuf field: google.protobuf.Duration retry_delay = 1 */ retry_delay?: Duration; } /** * Describes additional debugging info. * * @generated from protobuf message google.rpc.DebugInfo */ export interface DebugInfo { /** * The stack trace entries indicating where the error occurred. * * @generated from protobuf field: repeated string stack_entries = 1 */ stack_entries: string[]; /** * Additional debugging information provided by the server. * * @generated from protobuf field: string detail = 2 */ detail: string; } /** * Describes how a quota check failed. * * For example if a daily limit was exceeded for the calling project, * a service could respond with a QuotaFailure detail containing the project * id and the description of the quota limit that was exceeded. If the * calling project hasn't enabled the service in the developer console, then * a service could respond with the project id and set `service_disabled` * to true. * * Also see RetryDetail and Help types for other details about handling a * quota failure. * * @generated from protobuf message google.rpc.QuotaFailure */ export interface QuotaFailure { /** * Describes all quota violations. * * @generated from protobuf field: repeated google.rpc.QuotaFailure.Violation violations = 1 */ violations: QuotaFailure_Violation[]; } /** * A message type used to describe a single quota violation. For example, a * daily quota or a custom quota that was exceeded. * * @generated from protobuf message google.rpc.QuotaFailure.Violation */ export interface QuotaFailure_Violation { /** * The subject on which the quota check failed. * For example, "clientip:" or "project:". * * @generated from protobuf field: string subject = 1 */ subject: string; /** * A description of how the quota check failed. Clients can use this * description to find more about the quota configuration in the service's * public documentation, or find the relevant quota limit to adjust through * developer console. * * For example: "Service disabled" or "Daily Limit for read operations * exceeded". * * @generated from protobuf field: string description = 2 */ description: string; } /** * Describes what preconditions have failed. * * For example, if an RPC failed because it required the Terms of Service to be * acknowledged, it could list the terms of service violation in the * PreconditionFailure message. * * @generated from protobuf message google.rpc.PreconditionFailure */ export interface PreconditionFailure { /** * Describes all precondition violations. * * @generated from protobuf field: repeated google.rpc.PreconditionFailure.Violation violations = 1 */ violations: PreconditionFailure_Violation[]; } /** * A message type used to describe a single precondition failure. * * @generated from protobuf message google.rpc.PreconditionFailure.Violation */ export interface PreconditionFailure_Violation { /** * The type of PreconditionFailure. We recommend using a service-specific * enum type to define the supported precondition violation types. For * example, "TOS" for "Terms of Service violation". * * @generated from protobuf field: string type = 1 */ type: string; /** * The subject, relative to the type, that failed. * For example, "google.com/cloud" relative to the "TOS" type would * indicate which terms of service is being referenced. * * @generated from protobuf field: string subject = 2 */ subject: string; /** * A description of how the precondition failed. Developers can use this * description to understand how to fix the failure. * * For example: "Terms of service not accepted". * * @generated from protobuf field: string description = 3 */ description: string; } /** * Describes violations in a client request. This error type focuses on the * syntactic aspects of the request. * * @generated from protobuf message google.rpc.BadRequest */ export interface BadRequest { /** * Describes all violations in a client request. * * @generated from protobuf field: repeated google.rpc.BadRequest.FieldViolation field_violations = 1 */ field_violations: BadRequest_FieldViolation[]; } /** * A message type used to describe a single bad request field. * * @generated from protobuf message google.rpc.BadRequest.FieldViolation */ export interface BadRequest_FieldViolation { /** * A path leading to a field in the request body. The value will be a * sequence of dot-separated identifiers that identify a protocol buffer * field. E.g., "field_violations.field" would identify this field. * * @generated from protobuf field: string field = 1 */ field: string; /** * A description of why the request element is bad. * * @generated from protobuf field: string description = 2 */ description: string; } /** * Contains metadata about the request that clients can attach when filing a bug * or providing other forms of feedback. * * @generated from protobuf message google.rpc.RequestInfo */ export interface RequestInfo { /** * An opaque string that should only be interpreted by the service generating * it. For example, it can be used to identify requests in the service's logs. * * @generated from protobuf field: string request_id = 1 */ request_id: string; /** * Any data that was used to serve this request. For example, an encrypted * stack trace that can be sent back to the service provider for debugging. * * @generated from protobuf field: string serving_data = 2 */ serving_data: string; } /** * Describes the resource that is being accessed. * * @generated from protobuf message google.rpc.ResourceInfo */ export interface ResourceInfo { /** * A name for the type of resource being accessed, e.g. "sql table", * "cloud storage bucket", "file", "Google calendar"; or the type URL * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". * * @generated from protobuf field: string resource_type = 1 */ resource_type: string; /** * The name of the resource being accessed. For example, a shared calendar * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. * * @generated from protobuf field: string resource_name = 2 */ resource_name: string; /** * The owner of the resource (optional). * For example, "user:" or "project:". * * @generated from protobuf field: string owner = 3 */ owner: string; /** * Describes what error is encountered when accessing this resource. * For example, updating a cloud project may require the `writer` permission * on the developer console project. * * @generated from protobuf field: string description = 4 */ description: string; } /** * Provides links to documentation or for performing an out of band action. * * For example, if a quota check failed with an error indicating the calling * project hasn't enabled the accessed service, this can contain a URL pointing * directly to the right place in the developer console to flip the bit. * * @generated from protobuf message google.rpc.Help */ export interface Help { /** * URL(s) pointing to additional information on handling the current error. * * @generated from protobuf field: repeated google.rpc.Help.Link links = 1 */ links: Help_Link[]; } /** * Describes a URL link. * * @generated from protobuf message google.rpc.Help.Link */ export interface Help_Link { /** * Describes what the link offers. * * @generated from protobuf field: string description = 1 */ description: string; /** * The URL of the link. * * @generated from protobuf field: string url = 2 */ url: string; } /** * Provides a localized error message that is safe to return to the user * which can be attached to an RPC error. * * @generated from protobuf message google.rpc.LocalizedMessage */ export interface LocalizedMessage { /** * The locale used following the specification defined at * http://www.rfc-editor.org/rfc/bcp/bcp47.txt. * Examples are: "en-US", "fr-CH", "es-MX" * * @generated from protobuf field: string locale = 1 */ locale: string; /** * The localized error message in the above locale. * * @generated from protobuf field: string message = 2 */ message: string; } // @generated message type with reflection information, may provide speed optimized methods class RetryInfo$Type extends MessageType { constructor() { super("google.rpc.RetryInfo", [ { no: 1, name: "retry_delay", kind: "message", localName: "retry_delay", T: () => Duration } ]); } create(value?: PartialMessage): RetryInfo { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RetryInfo): RetryInfo { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* google.protobuf.Duration retry_delay */ 1: message.retry_delay = Duration.internalBinaryRead(reader, reader.uint32(), options, message.retry_delay); 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: RetryInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* google.protobuf.Duration retry_delay = 1; */ if (message.retry_delay) Duration.internalBinaryWrite(message.retry_delay, 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 google.rpc.RetryInfo */ export const RetryInfo = new RetryInfo$Type(); // @generated message type with reflection information, may provide speed optimized methods class DebugInfo$Type extends MessageType { constructor() { super("google.rpc.DebugInfo", [ { no: 1, name: "stack_entries", kind: "scalar", localName: "stack_entries", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "detail", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): DebugInfo { const message = globalThis.Object.create((this.messagePrototype!)); message.stack_entries = []; message.detail = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DebugInfo): DebugInfo { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated string stack_entries */ 1: message.stack_entries.push(reader.string()); break; case /* string detail */ 2: message.detail = 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: DebugInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated string stack_entries = 1; */ for (let i = 0; i < message.stack_entries.length; i++) writer.tag(1, WireType.LengthDelimited).string(message.stack_entries[i]); /* string detail = 2; */ if (message.detail !== "") writer.tag(2, WireType.LengthDelimited).string(message.detail); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.rpc.DebugInfo */ export const DebugInfo = new DebugInfo$Type(); // @generated message type with reflection information, may provide speed optimized methods class QuotaFailure$Type extends MessageType { constructor() { super("google.rpc.QuotaFailure", [ { no: 1, name: "violations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QuotaFailure_Violation } ]); } create(value?: PartialMessage): QuotaFailure { const message = globalThis.Object.create((this.messagePrototype!)); message.violations = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QuotaFailure): QuotaFailure { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.rpc.QuotaFailure.Violation violations */ 1: message.violations.push(QuotaFailure_Violation.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: QuotaFailure, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated google.rpc.QuotaFailure.Violation violations = 1; */ for (let i = 0; i < message.violations.length; i++) QuotaFailure_Violation.internalBinaryWrite(message.violations[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 google.rpc.QuotaFailure */ export const QuotaFailure = new QuotaFailure$Type(); // @generated message type with reflection information, may provide speed optimized methods class QuotaFailure_Violation$Type extends MessageType { constructor() { super("google.rpc.QuotaFailure.Violation", [ { no: 1, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): QuotaFailure_Violation { const message = globalThis.Object.create((this.messagePrototype!)); message.subject = ""; message.description = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QuotaFailure_Violation): QuotaFailure_Violation { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string subject */ 1: message.subject = reader.string(); break; case /* string description */ 2: message.description = 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: QuotaFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string subject = 1; */ if (message.subject !== "") writer.tag(1, WireType.LengthDelimited).string(message.subject); /* string description = 2; */ if (message.description !== "") writer.tag(2, WireType.LengthDelimited).string(message.description); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.rpc.QuotaFailure.Violation */ export const QuotaFailure_Violation = new QuotaFailure_Violation$Type(); // @generated message type with reflection information, may provide speed optimized methods class PreconditionFailure$Type extends MessageType { constructor() { super("google.rpc.PreconditionFailure", [ { no: 1, name: "violations", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PreconditionFailure_Violation } ]); } create(value?: PartialMessage): PreconditionFailure { const message = globalThis.Object.create((this.messagePrototype!)); message.violations = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PreconditionFailure): PreconditionFailure { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.rpc.PreconditionFailure.Violation violations */ 1: message.violations.push(PreconditionFailure_Violation.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: PreconditionFailure, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated google.rpc.PreconditionFailure.Violation violations = 1; */ for (let i = 0; i < message.violations.length; i++) PreconditionFailure_Violation.internalBinaryWrite(message.violations[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 google.rpc.PreconditionFailure */ export const PreconditionFailure = new PreconditionFailure$Type(); // @generated message type with reflection information, may provide speed optimized methods class PreconditionFailure_Violation$Type extends MessageType { constructor() { super("google.rpc.PreconditionFailure.Violation", [ { no: 1, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "subject", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): PreconditionFailure_Violation { const message = globalThis.Object.create((this.messagePrototype!)); message.type = ""; message.subject = ""; message.description = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PreconditionFailure_Violation): PreconditionFailure_Violation { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string type */ 1: message.type = reader.string(); break; case /* string subject */ 2: message.subject = reader.string(); break; case /* string description */ 3: message.description = 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: PreconditionFailure_Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string type = 1; */ if (message.type !== "") writer.tag(1, WireType.LengthDelimited).string(message.type); /* string subject = 2; */ if (message.subject !== "") writer.tag(2, WireType.LengthDelimited).string(message.subject); /* string description = 3; */ if (message.description !== "") writer.tag(3, WireType.LengthDelimited).string(message.description); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.rpc.PreconditionFailure.Violation */ export const PreconditionFailure_Violation = new PreconditionFailure_Violation$Type(); // @generated message type with reflection information, may provide speed optimized methods class BadRequest$Type extends MessageType { constructor() { super("google.rpc.BadRequest", [ { no: 1, name: "field_violations", kind: "message", localName: "field_violations", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BadRequest_FieldViolation } ]); } create(value?: PartialMessage): BadRequest { const message = globalThis.Object.create((this.messagePrototype!)); message.field_violations = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BadRequest): BadRequest { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.rpc.BadRequest.FieldViolation field_violations */ 1: message.field_violations.push(BadRequest_FieldViolation.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: BadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated google.rpc.BadRequest.FieldViolation field_violations = 1; */ for (let i = 0; i < message.field_violations.length; i++) BadRequest_FieldViolation.internalBinaryWrite(message.field_violations[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 google.rpc.BadRequest */ export const BadRequest = new BadRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class BadRequest_FieldViolation$Type extends MessageType { constructor() { super("google.rpc.BadRequest.FieldViolation", [ { no: 1, name: "field", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): BadRequest_FieldViolation { const message = globalThis.Object.create((this.messagePrototype!)); message.field = ""; message.description = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BadRequest_FieldViolation): BadRequest_FieldViolation { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string field */ 1: message.field = reader.string(); break; case /* string description */ 2: message.description = 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: BadRequest_FieldViolation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string field = 1; */ if (message.field !== "") writer.tag(1, WireType.LengthDelimited).string(message.field); /* string description = 2; */ if (message.description !== "") writer.tag(2, WireType.LengthDelimited).string(message.description); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.rpc.BadRequest.FieldViolation */ export const BadRequest_FieldViolation = new BadRequest_FieldViolation$Type(); // @generated message type with reflection information, may provide speed optimized methods class RequestInfo$Type extends MessageType { constructor() { super("google.rpc.RequestInfo", [ { no: 1, name: "request_id", kind: "scalar", localName: "request_id", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "serving_data", kind: "scalar", localName: "serving_data", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): RequestInfo { const message = globalThis.Object.create((this.messagePrototype!)); message.request_id = ""; message.serving_data = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RequestInfo): RequestInfo { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string request_id */ 1: message.request_id = reader.string(); break; case /* string serving_data */ 2: message.serving_data = 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: RequestInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string request_id = 1; */ if (message.request_id !== "") writer.tag(1, WireType.LengthDelimited).string(message.request_id); /* string serving_data = 2; */ if (message.serving_data !== "") writer.tag(2, WireType.LengthDelimited).string(message.serving_data); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.rpc.RequestInfo */ export const RequestInfo = new RequestInfo$Type(); // @generated message type with reflection information, may provide speed optimized methods class ResourceInfo$Type extends MessageType { constructor() { super("google.rpc.ResourceInfo", [ { no: 1, name: "resource_type", kind: "scalar", localName: "resource_type", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "resource_name", kind: "scalar", localName: "resource_name", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "owner", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 4, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): ResourceInfo { const message = globalThis.Object.create((this.messagePrototype!)); message.resource_type = ""; message.resource_name = ""; message.owner = ""; message.description = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceInfo): ResourceInfo { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string resource_type */ 1: message.resource_type = reader.string(); break; case /* string resource_name */ 2: message.resource_name = reader.string(); break; case /* string owner */ 3: message.owner = reader.string(); break; case /* string description */ 4: message.description = 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: ResourceInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string resource_type = 1; */ if (message.resource_type !== "") writer.tag(1, WireType.LengthDelimited).string(message.resource_type); /* string resource_name = 2; */ if (message.resource_name !== "") writer.tag(2, WireType.LengthDelimited).string(message.resource_name); /* string owner = 3; */ if (message.owner !== "") writer.tag(3, WireType.LengthDelimited).string(message.owner); /* string description = 4; */ if (message.description !== "") writer.tag(4, WireType.LengthDelimited).string(message.description); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.rpc.ResourceInfo */ export const ResourceInfo = new ResourceInfo$Type(); // @generated message type with reflection information, may provide speed optimized methods class Help$Type extends MessageType { constructor() { super("google.rpc.Help", [ { no: 1, name: "links", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Help_Link } ]); } create(value?: PartialMessage): Help { const message = globalThis.Object.create((this.messagePrototype!)); message.links = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Help): Help { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated google.rpc.Help.Link links */ 1: message.links.push(Help_Link.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: Help, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated google.rpc.Help.Link links = 1; */ for (let i = 0; i < message.links.length; i++) Help_Link.internalBinaryWrite(message.links[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 google.rpc.Help */ export const Help = new Help$Type(); // @generated message type with reflection information, may provide speed optimized methods class Help_Link$Type extends MessageType { constructor() { super("google.rpc.Help.Link", [ { no: 1, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): Help_Link { const message = globalThis.Object.create((this.messagePrototype!)); message.description = ""; message.url = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Help_Link): Help_Link { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string description */ 1: message.description = reader.string(); break; case /* string url */ 2: message.url = 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: Help_Link, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string description = 1; */ if (message.description !== "") writer.tag(1, WireType.LengthDelimited).string(message.description); /* string url = 2; */ if (message.url !== "") writer.tag(2, WireType.LengthDelimited).string(message.url); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.rpc.Help.Link */ export const Help_Link = new Help_Link$Type(); // @generated message type with reflection information, may provide speed optimized methods class LocalizedMessage$Type extends MessageType { constructor() { super("google.rpc.LocalizedMessage", [ { no: 1, name: "locale", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): LocalizedMessage { const message = globalThis.Object.create((this.messagePrototype!)); message.locale = ""; message.message = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LocalizedMessage): LocalizedMessage { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string locale */ 1: message.locale = reader.string(); break; case /* string message */ 2: message.message = 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: LocalizedMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string locale = 1; */ if (message.locale !== "") writer.tag(1, WireType.LengthDelimited).string(message.locale); /* string message = 2; */ if (message.message !== "") writer.tag(2, WireType.LengthDelimited).string(message.message); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message google.rpc.LocalizedMessage */ export const LocalizedMessage = new LocalizedMessage$Type();