You've already forked npm-viz-sdk
Latest generation
This commit is contained in:
275
google/rpc/code_pb.ts
Normal file
275
google/rpc/code_pb.ts
Normal file
@@ -0,0 +1,275 @@
|
||||
// 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.
|
||||
|
||||
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
||||
// @generated from file google/rpc/code.proto (package google.rpc, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { proto3 } from "@bufbuild/protobuf";
|
||||
|
||||
/**
|
||||
* The canonical error codes for Google APIs.
|
||||
*
|
||||
*
|
||||
* Sometimes multiple error codes may apply. Services should return
|
||||
* the most specific error code that applies. For example, prefer
|
||||
* `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
|
||||
* Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
|
||||
*
|
||||
* @generated from enum google.rpc.Code
|
||||
*/
|
||||
export enum Code {
|
||||
/**
|
||||
* Not an error; returned on success
|
||||
*
|
||||
* HTTP Mapping: 200 OK
|
||||
*
|
||||
* @generated from enum value: OK = 0;
|
||||
*/
|
||||
OK = 0,
|
||||
|
||||
/**
|
||||
* The operation was cancelled, typically by the caller.
|
||||
*
|
||||
* HTTP Mapping: 499 Client Closed Request
|
||||
*
|
||||
* @generated from enum value: CANCELLED = 1;
|
||||
*/
|
||||
CANCELLED = 1,
|
||||
|
||||
/**
|
||||
* Unknown error. For example, this error may be returned when
|
||||
* a `Status` value received from another address space belongs to
|
||||
* an error space that is not known in this address space. Also
|
||||
* errors raised by APIs that do not return enough error information
|
||||
* may be converted to this error.
|
||||
*
|
||||
* HTTP Mapping: 500 Internal Server Error
|
||||
*
|
||||
* @generated from enum value: UNKNOWN = 2;
|
||||
*/
|
||||
UNKNOWN = 2,
|
||||
|
||||
/**
|
||||
* The client specified an invalid argument. Note that this differs
|
||||
* from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
|
||||
* that are problematic regardless of the state of the system
|
||||
* (e.g., a malformed file name).
|
||||
*
|
||||
* HTTP Mapping: 400 Bad Request
|
||||
*
|
||||
* @generated from enum value: INVALID_ARGUMENT = 3;
|
||||
*/
|
||||
INVALID_ARGUMENT = 3,
|
||||
|
||||
/**
|
||||
* The deadline expired before the operation could complete. For operations
|
||||
* that change the state of the system, this error may be returned
|
||||
* even if the operation has completed successfully. For example, a
|
||||
* successful response from a server could have been delayed long
|
||||
* enough for the deadline to expire.
|
||||
*
|
||||
* HTTP Mapping: 504 Gateway Timeout
|
||||
*
|
||||
* @generated from enum value: DEADLINE_EXCEEDED = 4;
|
||||
*/
|
||||
DEADLINE_EXCEEDED = 4,
|
||||
|
||||
/**
|
||||
* Some requested entity (e.g., file or directory) was not found.
|
||||
*
|
||||
* Note to server developers: if a request is denied for an entire class
|
||||
* of users, such as gradual feature rollout or undocumented whitelist,
|
||||
* `NOT_FOUND` may be used. If a request is denied for some users within
|
||||
* a class of users, such as user-based access control, `PERMISSION_DENIED`
|
||||
* must be used.
|
||||
*
|
||||
* HTTP Mapping: 404 Not Found
|
||||
*
|
||||
* @generated from enum value: NOT_FOUND = 5;
|
||||
*/
|
||||
NOT_FOUND = 5,
|
||||
|
||||
/**
|
||||
* The entity that a client attempted to create (e.g., file or directory)
|
||||
* already exists.
|
||||
*
|
||||
* HTTP Mapping: 409 Conflict
|
||||
*
|
||||
* @generated from enum value: ALREADY_EXISTS = 6;
|
||||
*/
|
||||
ALREADY_EXISTS = 6,
|
||||
|
||||
/**
|
||||
* The caller does not have permission to execute the specified
|
||||
* operation. `PERMISSION_DENIED` must not be used for rejections
|
||||
* caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
|
||||
* instead for those errors). `PERMISSION_DENIED` must not be
|
||||
* used if the caller can not be identified (use `UNAUTHENTICATED`
|
||||
* instead for those errors). This error code does not imply the
|
||||
* request is valid or the requested entity exists or satisfies
|
||||
* other pre-conditions.
|
||||
*
|
||||
* HTTP Mapping: 403 Forbidden
|
||||
*
|
||||
* @generated from enum value: PERMISSION_DENIED = 7;
|
||||
*/
|
||||
PERMISSION_DENIED = 7,
|
||||
|
||||
/**
|
||||
* The request does not have valid authentication credentials for the
|
||||
* operation.
|
||||
*
|
||||
* HTTP Mapping: 401 Unauthorized
|
||||
*
|
||||
* @generated from enum value: UNAUTHENTICATED = 16;
|
||||
*/
|
||||
UNAUTHENTICATED = 16,
|
||||
|
||||
/**
|
||||
* Some resource has been exhausted, perhaps a per-user quota, or
|
||||
* perhaps the entire file system is out of space.
|
||||
*
|
||||
* HTTP Mapping: 429 Too Many Requests
|
||||
*
|
||||
* @generated from enum value: RESOURCE_EXHAUSTED = 8;
|
||||
*/
|
||||
RESOURCE_EXHAUSTED = 8,
|
||||
|
||||
/**
|
||||
* The operation was rejected because the system is not in a state
|
||||
* required for the operation's execution. For example, the directory
|
||||
* to be deleted is non-empty, an rmdir operation is applied to
|
||||
* a non-directory, etc.
|
||||
*
|
||||
* Service implementors can use the following guidelines to decide
|
||||
* between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
|
||||
* (a) Use `UNAVAILABLE` if the client can retry just the failing call.
|
||||
* (b) Use `ABORTED` if the client should retry at a higher level
|
||||
* (e.g., when a client-specified test-and-set fails, indicating the
|
||||
* client should restart a read-modify-write sequence).
|
||||
* (c) Use `FAILED_PRECONDITION` if the client should not retry until
|
||||
* the system state has been explicitly fixed. E.g., if an "rmdir"
|
||||
* fails because the directory is non-empty, `FAILED_PRECONDITION`
|
||||
* should be returned since the client should not retry unless
|
||||
* the files are deleted from the directory.
|
||||
*
|
||||
* HTTP Mapping: 400 Bad Request
|
||||
*
|
||||
* @generated from enum value: FAILED_PRECONDITION = 9;
|
||||
*/
|
||||
FAILED_PRECONDITION = 9,
|
||||
|
||||
/**
|
||||
* The operation was aborted, typically due to a concurrency issue such as
|
||||
* a sequencer check failure or transaction abort.
|
||||
*
|
||||
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
|
||||
* `ABORTED`, and `UNAVAILABLE`.
|
||||
*
|
||||
* HTTP Mapping: 409 Conflict
|
||||
*
|
||||
* @generated from enum value: ABORTED = 10;
|
||||
*/
|
||||
ABORTED = 10,
|
||||
|
||||
/**
|
||||
* The operation was attempted past the valid range. E.g., seeking or
|
||||
* reading past end-of-file.
|
||||
*
|
||||
* Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
|
||||
* be fixed if the system state changes. For example, a 32-bit file
|
||||
* system will generate `INVALID_ARGUMENT` if asked to read at an
|
||||
* offset that is not in the range [0,2^32-1], but it will generate
|
||||
* `OUT_OF_RANGE` if asked to read from an offset past the current
|
||||
* file size.
|
||||
*
|
||||
* There is a fair bit of overlap between `FAILED_PRECONDITION` and
|
||||
* `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
|
||||
* error) when it applies so that callers who are iterating through
|
||||
* a space can easily look for an `OUT_OF_RANGE` error to detect when
|
||||
* they are done.
|
||||
*
|
||||
* HTTP Mapping: 400 Bad Request
|
||||
*
|
||||
* @generated from enum value: OUT_OF_RANGE = 11;
|
||||
*/
|
||||
OUT_OF_RANGE = 11,
|
||||
|
||||
/**
|
||||
* The operation is not implemented or is not supported/enabled in this
|
||||
* service.
|
||||
*
|
||||
* HTTP Mapping: 501 Not Implemented
|
||||
*
|
||||
* @generated from enum value: UNIMPLEMENTED = 12;
|
||||
*/
|
||||
UNIMPLEMENTED = 12,
|
||||
|
||||
/**
|
||||
* Internal errors. This means that some invariants expected by the
|
||||
* underlying system have been broken. This error code is reserved
|
||||
* for serious errors.
|
||||
*
|
||||
* HTTP Mapping: 500 Internal Server Error
|
||||
*
|
||||
* @generated from enum value: INTERNAL = 13;
|
||||
*/
|
||||
INTERNAL = 13,
|
||||
|
||||
/**
|
||||
* The service is currently unavailable. This is most likely a
|
||||
* transient condition, which can be corrected by retrying with
|
||||
* a backoff.
|
||||
*
|
||||
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
|
||||
* `ABORTED`, and `UNAVAILABLE`.
|
||||
*
|
||||
* HTTP Mapping: 503 Service Unavailable
|
||||
*
|
||||
* @generated from enum value: UNAVAILABLE = 14;
|
||||
*/
|
||||
UNAVAILABLE = 14,
|
||||
|
||||
/**
|
||||
* Unrecoverable data loss or corruption.
|
||||
*
|
||||
* HTTP Mapping: 500 Internal Server Error
|
||||
*
|
||||
* @generated from enum value: DATA_LOSS = 15;
|
||||
*/
|
||||
DATA_LOSS = 15,
|
||||
}
|
||||
// Retrieve enum metadata with: proto3.getEnumType(Code)
|
||||
proto3.util.setEnumType(Code, "google.rpc.Code", [
|
||||
{ no: 0, name: "OK" },
|
||||
{ no: 1, name: "CANCELLED" },
|
||||
{ no: 2, name: "UNKNOWN" },
|
||||
{ no: 3, name: "INVALID_ARGUMENT" },
|
||||
{ no: 4, name: "DEADLINE_EXCEEDED" },
|
||||
{ no: 5, name: "NOT_FOUND" },
|
||||
{ no: 6, name: "ALREADY_EXISTS" },
|
||||
{ no: 7, name: "PERMISSION_DENIED" },
|
||||
{ no: 16, name: "UNAUTHENTICATED" },
|
||||
{ no: 8, name: "RESOURCE_EXHAUSTED" },
|
||||
{ no: 9, name: "FAILED_PRECONDITION" },
|
||||
{ no: 10, name: "ABORTED" },
|
||||
{ no: 11, name: "OUT_OF_RANGE" },
|
||||
{ no: 12, name: "UNIMPLEMENTED" },
|
||||
{ no: 13, name: "INTERNAL" },
|
||||
{ no: 14, name: "UNAVAILABLE" },
|
||||
{ no: 15, name: "DATA_LOSS" },
|
||||
]);
|
||||
|
||||
707
google/rpc/error_details_pb.ts
Normal file
707
google/rpc/error_details_pb.ts
Normal file
@@ -0,0 +1,707 @@
|
||||
// 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.
|
||||
|
||||
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
||||
// @generated from file google/rpc/error_details.proto (package google.rpc, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
||||
import { Message, proto3 } from "@bufbuild/protobuf";
|
||||
import { Duration } from "../protobuf/duration_pb.js";
|
||||
|
||||
/**
|
||||
* 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 message google.rpc.RetryInfo
|
||||
*/
|
||||
export class RetryInfo extends Message<RetryInfo> {
|
||||
/**
|
||||
* Clients should wait at least this long between retrying the same request.
|
||||
*
|
||||
* @generated from field: google.protobuf.Duration retry_delay = 1;
|
||||
*/
|
||||
retryDelay?: Duration;
|
||||
|
||||
constructor(data?: PartialMessage<RetryInfo>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.RetryInfo";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "retry_delay", kind: "message", T: Duration },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RetryInfo {
|
||||
return new RetryInfo().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RetryInfo {
|
||||
return new RetryInfo().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RetryInfo {
|
||||
return new RetryInfo().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: RetryInfo | PlainMessage<RetryInfo> | undefined, b: RetryInfo | PlainMessage<RetryInfo> | undefined): boolean {
|
||||
return proto3.util.equals(RetryInfo, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes additional debugging info.
|
||||
*
|
||||
* @generated from message google.rpc.DebugInfo
|
||||
*/
|
||||
export class DebugInfo extends Message<DebugInfo> {
|
||||
/**
|
||||
* The stack trace entries indicating where the error occurred.
|
||||
*
|
||||
* @generated from field: repeated string stack_entries = 1;
|
||||
*/
|
||||
stackEntries: string[] = [];
|
||||
|
||||
/**
|
||||
* Additional debugging information provided by the server.
|
||||
*
|
||||
* @generated from field: string detail = 2;
|
||||
*/
|
||||
detail = "";
|
||||
|
||||
constructor(data?: PartialMessage<DebugInfo>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.DebugInfo";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "stack_entries", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
||||
{ no: 2, name: "detail", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DebugInfo {
|
||||
return new DebugInfo().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DebugInfo {
|
||||
return new DebugInfo().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DebugInfo {
|
||||
return new DebugInfo().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: DebugInfo | PlainMessage<DebugInfo> | undefined, b: DebugInfo | PlainMessage<DebugInfo> | undefined): boolean {
|
||||
return proto3.util.equals(DebugInfo, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 message google.rpc.QuotaFailure
|
||||
*/
|
||||
export class QuotaFailure extends Message<QuotaFailure> {
|
||||
/**
|
||||
* Describes all quota violations.
|
||||
*
|
||||
* @generated from field: repeated google.rpc.QuotaFailure.Violation violations = 1;
|
||||
*/
|
||||
violations: QuotaFailure_Violation[] = [];
|
||||
|
||||
constructor(data?: PartialMessage<QuotaFailure>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.QuotaFailure";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "violations", kind: "message", T: QuotaFailure_Violation, repeated: true },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QuotaFailure {
|
||||
return new QuotaFailure().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QuotaFailure {
|
||||
return new QuotaFailure().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QuotaFailure {
|
||||
return new QuotaFailure().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: QuotaFailure | PlainMessage<QuotaFailure> | undefined, b: QuotaFailure | PlainMessage<QuotaFailure> | undefined): boolean {
|
||||
return proto3.util.equals(QuotaFailure, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A message type used to describe a single quota violation. For example, a
|
||||
* daily quota or a custom quota that was exceeded.
|
||||
*
|
||||
* @generated from message google.rpc.QuotaFailure.Violation
|
||||
*/
|
||||
export class QuotaFailure_Violation extends Message<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 field: string subject = 1;
|
||||
*/
|
||||
subject = "";
|
||||
|
||||
/**
|
||||
* 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 field: string description = 2;
|
||||
*/
|
||||
description = "";
|
||||
|
||||
constructor(data?: PartialMessage<QuotaFailure_Violation>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.QuotaFailure.Violation";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "subject", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QuotaFailure_Violation {
|
||||
return new QuotaFailure_Violation().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QuotaFailure_Violation {
|
||||
return new QuotaFailure_Violation().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QuotaFailure_Violation {
|
||||
return new QuotaFailure_Violation().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: QuotaFailure_Violation | PlainMessage<QuotaFailure_Violation> | undefined, b: QuotaFailure_Violation | PlainMessage<QuotaFailure_Violation> | undefined): boolean {
|
||||
return proto3.util.equals(QuotaFailure_Violation, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 message google.rpc.PreconditionFailure
|
||||
*/
|
||||
export class PreconditionFailure extends Message<PreconditionFailure> {
|
||||
/**
|
||||
* Describes all precondition violations.
|
||||
*
|
||||
* @generated from field: repeated google.rpc.PreconditionFailure.Violation violations = 1;
|
||||
*/
|
||||
violations: PreconditionFailure_Violation[] = [];
|
||||
|
||||
constructor(data?: PartialMessage<PreconditionFailure>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.PreconditionFailure";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "violations", kind: "message", T: PreconditionFailure_Violation, repeated: true },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PreconditionFailure {
|
||||
return new PreconditionFailure().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PreconditionFailure {
|
||||
return new PreconditionFailure().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PreconditionFailure {
|
||||
return new PreconditionFailure().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: PreconditionFailure | PlainMessage<PreconditionFailure> | undefined, b: PreconditionFailure | PlainMessage<PreconditionFailure> | undefined): boolean {
|
||||
return proto3.util.equals(PreconditionFailure, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A message type used to describe a single precondition failure.
|
||||
*
|
||||
* @generated from message google.rpc.PreconditionFailure.Violation
|
||||
*/
|
||||
export class PreconditionFailure_Violation extends Message<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 field: string type = 1;
|
||||
*/
|
||||
type = "";
|
||||
|
||||
/**
|
||||
* 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 field: string subject = 2;
|
||||
*/
|
||||
subject = "";
|
||||
|
||||
/**
|
||||
* 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 field: string description = 3;
|
||||
*/
|
||||
description = "";
|
||||
|
||||
constructor(data?: PartialMessage<PreconditionFailure_Violation>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.PreconditionFailure.Violation";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ 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 */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PreconditionFailure_Violation {
|
||||
return new PreconditionFailure_Violation().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PreconditionFailure_Violation {
|
||||
return new PreconditionFailure_Violation().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PreconditionFailure_Violation {
|
||||
return new PreconditionFailure_Violation().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: PreconditionFailure_Violation | PlainMessage<PreconditionFailure_Violation> | undefined, b: PreconditionFailure_Violation | PlainMessage<PreconditionFailure_Violation> | undefined): boolean {
|
||||
return proto3.util.equals(PreconditionFailure_Violation, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes violations in a client request. This error type focuses on the
|
||||
* syntactic aspects of the request.
|
||||
*
|
||||
* @generated from message google.rpc.BadRequest
|
||||
*/
|
||||
export class BadRequest extends Message<BadRequest> {
|
||||
/**
|
||||
* Describes all violations in a client request.
|
||||
*
|
||||
* @generated from field: repeated google.rpc.BadRequest.FieldViolation field_violations = 1;
|
||||
*/
|
||||
fieldViolations: BadRequest_FieldViolation[] = [];
|
||||
|
||||
constructor(data?: PartialMessage<BadRequest>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.BadRequest";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "field_violations", kind: "message", T: BadRequest_FieldViolation, repeated: true },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BadRequest {
|
||||
return new BadRequest().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BadRequest {
|
||||
return new BadRequest().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BadRequest {
|
||||
return new BadRequest().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: BadRequest | PlainMessage<BadRequest> | undefined, b: BadRequest | PlainMessage<BadRequest> | undefined): boolean {
|
||||
return proto3.util.equals(BadRequest, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A message type used to describe a single bad request field.
|
||||
*
|
||||
* @generated from message google.rpc.BadRequest.FieldViolation
|
||||
*/
|
||||
export class BadRequest_FieldViolation extends Message<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 field: string field = 1;
|
||||
*/
|
||||
field = "";
|
||||
|
||||
/**
|
||||
* A description of why the request element is bad.
|
||||
*
|
||||
* @generated from field: string description = 2;
|
||||
*/
|
||||
description = "";
|
||||
|
||||
constructor(data?: PartialMessage<BadRequest_FieldViolation>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.BadRequest.FieldViolation";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "field", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BadRequest_FieldViolation {
|
||||
return new BadRequest_FieldViolation().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BadRequest_FieldViolation {
|
||||
return new BadRequest_FieldViolation().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BadRequest_FieldViolation {
|
||||
return new BadRequest_FieldViolation().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: BadRequest_FieldViolation | PlainMessage<BadRequest_FieldViolation> | undefined, b: BadRequest_FieldViolation | PlainMessage<BadRequest_FieldViolation> | undefined): boolean {
|
||||
return proto3.util.equals(BadRequest_FieldViolation, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains metadata about the request that clients can attach when filing a bug
|
||||
* or providing other forms of feedback.
|
||||
*
|
||||
* @generated from message google.rpc.RequestInfo
|
||||
*/
|
||||
export class RequestInfo extends Message<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 field: string request_id = 1;
|
||||
*/
|
||||
requestId = "";
|
||||
|
||||
/**
|
||||
* 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 field: string serving_data = 2;
|
||||
*/
|
||||
servingData = "";
|
||||
|
||||
constructor(data?: PartialMessage<RequestInfo>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.RequestInfo";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 2, name: "serving_data", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RequestInfo {
|
||||
return new RequestInfo().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RequestInfo {
|
||||
return new RequestInfo().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RequestInfo {
|
||||
return new RequestInfo().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: RequestInfo | PlainMessage<RequestInfo> | undefined, b: RequestInfo | PlainMessage<RequestInfo> | undefined): boolean {
|
||||
return proto3.util.equals(RequestInfo, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the resource that is being accessed.
|
||||
*
|
||||
* @generated from message google.rpc.ResourceInfo
|
||||
*/
|
||||
export class ResourceInfo extends Message<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 field: string resource_type = 1;
|
||||
*/
|
||||
resourceType = "";
|
||||
|
||||
/**
|
||||
* 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 field: string resource_name = 2;
|
||||
*/
|
||||
resourceName = "";
|
||||
|
||||
/**
|
||||
* The owner of the resource (optional).
|
||||
* For example, "user:<owner email>" or "project:<Google developer project
|
||||
* id>".
|
||||
*
|
||||
* @generated from field: string owner = 3;
|
||||
*/
|
||||
owner = "";
|
||||
|
||||
/**
|
||||
* 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 field: string description = 4;
|
||||
*/
|
||||
description = "";
|
||||
|
||||
constructor(data?: PartialMessage<ResourceInfo>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.ResourceInfo";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ 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 */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ResourceInfo {
|
||||
return new ResourceInfo().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ResourceInfo {
|
||||
return new ResourceInfo().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ResourceInfo {
|
||||
return new ResourceInfo().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: ResourceInfo | PlainMessage<ResourceInfo> | undefined, b: ResourceInfo | PlainMessage<ResourceInfo> | undefined): boolean {
|
||||
return proto3.util.equals(ResourceInfo, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 message google.rpc.Help
|
||||
*/
|
||||
export class Help extends Message<Help> {
|
||||
/**
|
||||
* URL(s) pointing to additional information on handling the current error.
|
||||
*
|
||||
* @generated from field: repeated google.rpc.Help.Link links = 1;
|
||||
*/
|
||||
links: Help_Link[] = [];
|
||||
|
||||
constructor(data?: PartialMessage<Help>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.Help";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "links", kind: "message", T: Help_Link, repeated: true },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Help {
|
||||
return new Help().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Help {
|
||||
return new Help().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Help {
|
||||
return new Help().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: Help | PlainMessage<Help> | undefined, b: Help | PlainMessage<Help> | undefined): boolean {
|
||||
return proto3.util.equals(Help, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes a URL link.
|
||||
*
|
||||
* @generated from message google.rpc.Help.Link
|
||||
*/
|
||||
export class Help_Link extends Message<Help_Link> {
|
||||
/**
|
||||
* Describes what the link offers.
|
||||
*
|
||||
* @generated from field: string description = 1;
|
||||
*/
|
||||
description = "";
|
||||
|
||||
/**
|
||||
* The URL of the link.
|
||||
*
|
||||
* @generated from field: string url = 2;
|
||||
*/
|
||||
url = "";
|
||||
|
||||
constructor(data?: PartialMessage<Help_Link>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.Help.Link";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Help_Link {
|
||||
return new Help_Link().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Help_Link {
|
||||
return new Help_Link().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Help_Link {
|
||||
return new Help_Link().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: Help_Link | PlainMessage<Help_Link> | undefined, b: Help_Link | PlainMessage<Help_Link> | undefined): boolean {
|
||||
return proto3.util.equals(Help_Link, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a localized error message that is safe to return to the user
|
||||
* which can be attached to an RPC error.
|
||||
*
|
||||
* @generated from message google.rpc.LocalizedMessage
|
||||
*/
|
||||
export class LocalizedMessage extends Message<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 field: string locale = 1;
|
||||
*/
|
||||
locale = "";
|
||||
|
||||
/**
|
||||
* The localized error message in the above locale.
|
||||
*
|
||||
* @generated from field: string message = 2;
|
||||
*/
|
||||
message = "";
|
||||
|
||||
constructor(data?: PartialMessage<LocalizedMessage>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.LocalizedMessage";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "locale", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalizedMessage {
|
||||
return new LocalizedMessage().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalizedMessage {
|
||||
return new LocalizedMessage().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalizedMessage {
|
||||
return new LocalizedMessage().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: LocalizedMessage | PlainMessage<LocalizedMessage> | undefined, b: LocalizedMessage | PlainMessage<LocalizedMessage> | undefined): boolean {
|
||||
return proto3.util.equals(LocalizedMessage, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
134
google/rpc/status_pb.ts
Normal file
134
google/rpc/status_pb.ts
Normal file
@@ -0,0 +1,134 @@
|
||||
// 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.
|
||||
|
||||
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
||||
// @generated from file google/rpc/status.proto (package google.rpc, syntax proto3)
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
||||
import { Message, proto3 } from "@bufbuild/protobuf";
|
||||
import { Any } from "../protobuf/any_pb.js";
|
||||
|
||||
/**
|
||||
* The `Status` type defines a logical error model that is suitable for different
|
||||
* programming environments, including REST APIs and RPC APIs. It is used by
|
||||
* [gRPC](https://github.com/grpc). The error model is designed to be:
|
||||
*
|
||||
* - Simple to use and understand for most users
|
||||
* - Flexible enough to meet unexpected needs
|
||||
*
|
||||
* # Overview
|
||||
*
|
||||
* The `Status` message contains three pieces of data: error code, error message,
|
||||
* and error details. The error code should be an enum value of
|
||||
* [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
|
||||
* error message should be a developer-facing English message that helps
|
||||
* developers *understand* and *resolve* the error. If a localized user-facing
|
||||
* error message is needed, put the localized message in the error details or
|
||||
* localize it in the client. The optional error details may contain arbitrary
|
||||
* information about the error. There is a predefined set of error detail types
|
||||
* in the package `google.rpc` that can be used for common error conditions.
|
||||
*
|
||||
* # Language mapping
|
||||
*
|
||||
* The `Status` message is the logical representation of the error model, but it
|
||||
* is not necessarily the actual wire format. When the `Status` message is
|
||||
* exposed in different client libraries and different wire protocols, it can be
|
||||
* mapped differently. For example, it will likely be mapped to some exceptions
|
||||
* in Java, but more likely mapped to some error codes in C.
|
||||
*
|
||||
* # Other uses
|
||||
*
|
||||
* The error model and the `Status` message can be used in a variety of
|
||||
* environments, either with or without APIs, to provide a
|
||||
* consistent developer experience across different environments.
|
||||
*
|
||||
* Example uses of this error model include:
|
||||
*
|
||||
* - Partial errors. If a service needs to return partial errors to the client,
|
||||
* it may embed the `Status` in the normal response to indicate the partial
|
||||
* errors.
|
||||
*
|
||||
* - Workflow errors. A typical workflow has multiple steps. Each step may
|
||||
* have a `Status` message for error reporting.
|
||||
*
|
||||
* - Batch operations. If a client uses batch request and batch response, the
|
||||
* `Status` message should be used directly inside batch response, one for
|
||||
* each error sub-response.
|
||||
*
|
||||
* - Asynchronous operations. If an API call embeds asynchronous operation
|
||||
* results in its response, the status of those operations should be
|
||||
* represented directly using the `Status` message.
|
||||
*
|
||||
* - Logging. If some API errors are stored in logs, the message `Status` could
|
||||
* be used directly after any stripping needed for security/privacy reasons.
|
||||
*
|
||||
* @generated from message google.rpc.Status
|
||||
*/
|
||||
export class Status extends Message<Status> {
|
||||
/**
|
||||
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
|
||||
*
|
||||
* @generated from field: int32 code = 1;
|
||||
*/
|
||||
code = 0;
|
||||
|
||||
/**
|
||||
* A developer-facing error message, which should be in English. Any
|
||||
* user-facing error message should be localized and sent in the
|
||||
* [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
|
||||
*
|
||||
* @generated from field: string message = 2;
|
||||
*/
|
||||
message = "";
|
||||
|
||||
/**
|
||||
* A list of messages that carry the error details. There is a common set of
|
||||
* message types for APIs to use.
|
||||
*
|
||||
* @generated from field: repeated google.protobuf.Any details = 3;
|
||||
*/
|
||||
details: Any[] = [];
|
||||
|
||||
constructor(data?: PartialMessage<Status>) {
|
||||
super();
|
||||
proto3.util.initPartial(data, this);
|
||||
}
|
||||
|
||||
static readonly runtime: typeof proto3 = proto3;
|
||||
static readonly typeName = "google.rpc.Status";
|
||||
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
||||
{ no: 1, name: "code", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
||||
{ no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
||||
{ no: 3, name: "details", kind: "message", T: Any, repeated: true },
|
||||
]);
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Status {
|
||||
return new Status().fromBinary(bytes, options);
|
||||
}
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Status {
|
||||
return new Status().fromJson(jsonValue, options);
|
||||
}
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Status {
|
||||
return new Status().fromJsonString(jsonString, options);
|
||||
}
|
||||
|
||||
static equals(a: Status | PlainMessage<Status> | undefined, b: Status | PlainMessage<Status> | undefined): boolean {
|
||||
return proto3.util.equals(Status, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user