You've already forked npm-viz-sdk
1025 lines
44 KiB
TypeScript
1025 lines
44 KiB
TypeScript
// @generated by protobuf-ts 2.9.5
|
|
// @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;
|
|
*/
|
|
retryDelay?: 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;
|
|
*/
|
|
stackEntries: 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:<ip address of client>" or "project:<Google
|
|
* developer project id>".
|
|
*
|
|
* @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;
|
|
*/
|
|
fieldViolations: 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;
|
|
*/
|
|
requestId: 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;
|
|
*/
|
|
servingData: 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;
|
|
*/
|
|
resourceType: 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;
|
|
*/
|
|
resourceName: string;
|
|
/**
|
|
* The owner of the resource (optional).
|
|
* For example, "user:<owner email>" or "project:<Google developer project
|
|
* id>".
|
|
*
|
|
* @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<RetryInfo> {
|
|
constructor() {
|
|
super("google.rpc.RetryInfo", [
|
|
{ no: 1, name: "retry_delay", kind: "message", T: () => Duration }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<RetryInfo>): RetryInfo {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<RetryInfo>(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.retryDelay = Duration.internalBinaryRead(reader, reader.uint32(), options, message.retryDelay);
|
|
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.retryDelay)
|
|
Duration.internalBinaryWrite(message.retryDelay, 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<DebugInfo> {
|
|
constructor() {
|
|
super("google.rpc.DebugInfo", [
|
|
{ no: 1, name: "stack_entries", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "detail", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<DebugInfo>): DebugInfo {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.stackEntries = [];
|
|
message.detail = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DebugInfo>(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.stackEntries.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.stackEntries.length; i++)
|
|
writer.tag(1, WireType.LengthDelimited).string(message.stackEntries[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<QuotaFailure> {
|
|
constructor() {
|
|
super("google.rpc.QuotaFailure", [
|
|
{ no: 1, name: "violations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => QuotaFailure_Violation }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<QuotaFailure>): QuotaFailure {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.violations = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<QuotaFailure>(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<QuotaFailure_Violation> {
|
|
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>): QuotaFailure_Violation {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.subject = "";
|
|
message.description = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<QuotaFailure_Violation>(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<PreconditionFailure> {
|
|
constructor() {
|
|
super("google.rpc.PreconditionFailure", [
|
|
{ no: 1, name: "violations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => PreconditionFailure_Violation }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<PreconditionFailure>): PreconditionFailure {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.violations = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PreconditionFailure>(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<PreconditionFailure_Violation> {
|
|
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>): PreconditionFailure_Violation {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.type = "";
|
|
message.subject = "";
|
|
message.description = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PreconditionFailure_Violation>(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<BadRequest> {
|
|
constructor() {
|
|
super("google.rpc.BadRequest", [
|
|
{ no: 1, name: "field_violations", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => BadRequest_FieldViolation }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<BadRequest>): BadRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.fieldViolations = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<BadRequest>(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.fieldViolations.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.fieldViolations.length; i++)
|
|
BadRequest_FieldViolation.internalBinaryWrite(message.fieldViolations[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<BadRequest_FieldViolation> {
|
|
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>): BadRequest_FieldViolation {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.field = "";
|
|
message.description = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<BadRequest_FieldViolation>(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<RequestInfo> {
|
|
constructor() {
|
|
super("google.rpc.RequestInfo", [
|
|
{ no: 1, name: "request_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "serving_data", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<RequestInfo>): RequestInfo {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.requestId = "";
|
|
message.servingData = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<RequestInfo>(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.requestId = reader.string();
|
|
break;
|
|
case /* string serving_data */ 2:
|
|
message.servingData = 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.requestId !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.requestId);
|
|
/* string serving_data = 2; */
|
|
if (message.servingData !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.servingData);
|
|
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<ResourceInfo> {
|
|
constructor() {
|
|
super("google.rpc.ResourceInfo", [
|
|
{ no: 1, name: "resource_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "resource_name", kind: "scalar", 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>): ResourceInfo {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.resourceType = "";
|
|
message.resourceName = "";
|
|
message.owner = "";
|
|
message.description = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ResourceInfo>(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.resourceType = reader.string();
|
|
break;
|
|
case /* string resource_name */ 2:
|
|
message.resourceName = 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.resourceType !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.resourceType);
|
|
/* string resource_name = 2; */
|
|
if (message.resourceName !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.resourceName);
|
|
/* 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<Help> {
|
|
constructor() {
|
|
super("google.rpc.Help", [
|
|
{ no: 1, name: "links", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Help_Link }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<Help>): Help {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.links = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Help>(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<Help_Link> {
|
|
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>): Help_Link {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.description = "";
|
|
message.url = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Help_Link>(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<LocalizedMessage> {
|
|
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>): LocalizedMessage {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.locale = "";
|
|
message.message = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<LocalizedMessage>(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();
|