Latest generation

This commit is contained in:
ci core model
2025-03-24 13:04:28 +00:00
parent 83ee1ac60b
commit d1039afe4e
188 changed files with 1 additions and 97880 deletions

View File

@@ -1,34 +0,0 @@
// Copyright (c) 2015, 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/api/annotations.proto (package google.api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
import { MethodOptions } from "../protobuf/descriptor_pb.js";
import { HttpRule } from "./http_pb.js";
/**
* See `HttpRule`.
*
* @generated from extension: google.api.HttpRule http = 72295728;
*/
export const http = proto3.makeExtension<MethodOptions, HttpRule>(
"google.api.http",
MethodOptions,
() => ({ no: 72295728, kind: "message", T: HttpRule }),
);

View File

@@ -1,118 +0,0 @@
// Copyright 2020 Google LLC
//
// 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/api/field_behavior.proto (package google.api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
import { FieldOptions } from "../protobuf/descriptor_pb.js";
/**
* An indicator of the behavior of a given field (for example, that a field
* is required in requests, or given as output but ignored as input).
* This **does not** change the behavior in protocol buffers itself; it only
* denotes the behavior and may affect how API tooling handles the field.
*
* Note: This enum **may** receive new values in the future.
*
* @generated from enum google.api.FieldBehavior
*/
export enum FieldBehavior {
/**
* Conventional default for enums. Do not use this.
*
* @generated from enum value: FIELD_BEHAVIOR_UNSPECIFIED = 0;
*/
FIELD_BEHAVIOR_UNSPECIFIED = 0,
/**
* Specifically denotes a field as optional.
* While all fields in protocol buffers are optional, this may be specified
* for emphasis if appropriate.
*
* @generated from enum value: OPTIONAL = 1;
*/
OPTIONAL = 1,
/**
* Denotes a field as required.
* This indicates that the field **must** be provided as part of the request,
* and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
*
* @generated from enum value: REQUIRED = 2;
*/
REQUIRED = 2,
/**
* Denotes a field as output only.
* This indicates that the field is provided in responses, but including the
* field in a request does nothing (the server *must* ignore it and
* *must not* throw an error as a result of the field's presence).
*
* @generated from enum value: OUTPUT_ONLY = 3;
*/
OUTPUT_ONLY = 3,
/**
* Denotes a field as input only.
* This indicates that the field is provided in requests, and the
* corresponding field is not included in output.
*
* @generated from enum value: INPUT_ONLY = 4;
*/
INPUT_ONLY = 4,
/**
* Denotes a field as immutable.
* This indicates that the field may be set once in a request to create a
* resource, but may not be changed thereafter.
*
* @generated from enum value: IMMUTABLE = 5;
*/
IMMUTABLE = 5,
}
// Retrieve enum metadata with: proto3.getEnumType(FieldBehavior)
proto3.util.setEnumType(FieldBehavior, "google.api.FieldBehavior", [
{ no: 0, name: "FIELD_BEHAVIOR_UNSPECIFIED" },
{ no: 1, name: "OPTIONAL" },
{ no: 2, name: "REQUIRED" },
{ no: 3, name: "OUTPUT_ONLY" },
{ no: 4, name: "INPUT_ONLY" },
{ no: 5, name: "IMMUTABLE" },
]);
/**
* A designation of a specific field behavior (required, output only, etc.)
* in protobuf messages.
*
* Examples:
*
* string name = 1 [(google.api.field_behavior) = REQUIRED];
* State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
* google.protobuf.Duration ttl = 1
* [(google.api.field_behavior) = INPUT_ONLY];
* google.protobuf.Timestamp expire_time = 1
* [(google.api.field_behavior) = OUTPUT_ONLY,
* (google.api.field_behavior) = IMMUTABLE];
*
* @generated from extension: repeated google.api.FieldBehavior field_behavior = 1052;
*/
export const field_behavior = proto3.makeExtension<FieldOptions, FieldBehavior[]>(
"google.api.field_behavior",
FieldOptions,
() => ({ no: 1052, kind: "enum", T: proto3.getEnumType(FieldBehavior), repeated: true }),
);

View File

@@ -1,543 +0,0 @@
// Copyright 2020 Google LLC
//
// 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/api/http.proto (package google.api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* Defines the HTTP configuration for an API service. It contains a list of
* [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
* to one or more HTTP REST API methods.
*
* @generated from message google.api.Http
*/
export class Http extends Message<Http> {
/**
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
*
* @generated from field: repeated google.api.HttpRule rules = 1;
*/
rules: HttpRule[] = [];
/**
* When set to true, URL path parameters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*
* @generated from field: bool fully_decode_reserved_expansion = 2;
*/
fullyDecodeReservedExpansion = false;
constructor(data?: PartialMessage<Http>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.Http";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "rules", kind: "message", T: HttpRule, repeated: true },
{ no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Http {
return new Http().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Http {
return new Http().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Http {
return new Http().fromJsonString(jsonString, options);
}
static equals(a: Http | PlainMessage<Http> | undefined, b: Http | PlainMessage<Http> | undefined): boolean {
return proto3.util.equals(Http, a, b);
}
}
/**
* # gRPC Transcoding
*
* gRPC Transcoding is a feature for mapping between a gRPC method and one or
* more HTTP REST endpoints. It allows developers to build a single API service
* that supports both gRPC APIs and REST APIs. Many systems, including [Google
* APIs](https://github.com/googleapis/googleapis),
* [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
* Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
* and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
* and use it for large scale production services.
*
* `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
* how different portions of the gRPC request message are mapped to the URL
* path, URL query parameters, and HTTP request body. It also controls how the
* gRPC response message is mapped to the HTTP response body. `HttpRule` is
* typically specified as an `google.api.http` annotation on the gRPC method.
*
* Each mapping specifies a URL path template and an HTTP method. The path
* template may refer to one or more fields in the gRPC request message, as long
* as each field is a non-repeated field with a primitive (non-message) type.
* The path template controls how fields of the request message are mapped to
* the URL path.
*
* Example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get: "/v1/{name=messages/*}"
* };
* }
* }
* message GetMessageRequest {
* string name = 1; // Mapped to URL path.
* }
* message Message {
* string text = 1; // The resource content.
* }
*
* This enables an HTTP REST to gRPC mapping as below:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
*
* Any fields in the request message which are not bound by the path template
* automatically become HTTP query parameters if there is no HTTP request body.
* For example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get:"/v1/messages/{message_id}"
* };
* }
* }
* message GetMessageRequest {
* message SubMessage {
* string subfield = 1;
* }
* string message_id = 1; // Mapped to URL path.
* int64 revision = 2; // Mapped to URL query parameter `revision`.
* SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
* }
*
* This enables a HTTP JSON to RPC mapping as below:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
* `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
* "foo"))`
*
* Note that fields which are mapped to URL query parameters must have a
* primitive type or a repeated primitive type or a non-repeated message type.
* In the case of a repeated type, the parameter can be repeated in the URL
* as `...?param=A&param=B`. In the case of a message type, each field of the
* message is mapped to a separate parameter, such as
* `...?foo.a=A&foo.b=B&foo.c=C`.
*
* For HTTP methods that allow a request body, the `body` field
* specifies the mapping. Consider a REST update method on the
* message resource collection:
*
* service Messaging {
* rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
* option (google.api.http) = {
* patch: "/v1/messages/{message_id}"
* body: "message"
* };
* }
* }
* message UpdateMessageRequest {
* string message_id = 1; // mapped to the URL
* Message message = 2; // mapped to the body
* }
*
* The following HTTP JSON to RPC mapping is enabled, where the
* representation of the JSON in the request body is determined by
* protos JSON encoding:
*
* HTTP | gRPC
* -----|-----
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" message { text: "Hi!" })`
*
* The special name `*` can be used in the body mapping to define that
* every field not bound by the path template should be mapped to the
* request body. This enables the following alternative definition of
* the update method:
*
* service Messaging {
* rpc UpdateMessage(Message) returns (Message) {
* option (google.api.http) = {
* patch: "/v1/messages/{message_id}"
* body: "*"
* };
* }
* }
* message Message {
* string message_id = 1;
* string text = 2;
* }
*
*
* The following HTTP JSON to RPC mapping is enabled:
*
* HTTP | gRPC
* -----|-----
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" text: "Hi!")`
*
* Note that when using `*` in the body mapping, it is not possible to
* have HTTP parameters, as all fields not bound by the path end in
* the body. This makes this option more rarely used in practice when
* defining REST APIs. The common usage of `*` is in custom methods
* which don't use the URL at all for transferring data.
*
* It is possible to define multiple HTTP methods for one RPC by using
* the `additional_bindings` option. Example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get: "/v1/messages/{message_id}"
* additional_bindings {
* get: "/v1/users/{user_id}/messages/{message_id}"
* }
* };
* }
* }
* message GetMessageRequest {
* string message_id = 1;
* string user_id = 2;
* }
*
* This enables the following two alternative HTTP JSON to RPC mappings:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
* `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
* "123456")`
*
* ## Rules for HTTP mapping
*
* 1. Leaf request fields (recursive expansion nested messages in the request
* message) are classified into three categories:
* - Fields referred by the path template. They are passed via the URL path.
* - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
* request body.
* - All other fields are passed via the URL query parameters, and the
* parameter name is the field path in the request message. A repeated
* field can be represented as multiple query parameters under the same
* name.
* 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
* are passed via URL path and HTTP request body.
* 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
* fields are passed via URL path and URL query parameters.
*
* ### Path template syntax
*
* Template = "/" Segments [ Verb ] ;
* Segments = Segment { "/" Segment } ;
* Segment = "*" | "**" | LITERAL | Variable ;
* Variable = "{" FieldPath [ "=" Segments ] "}" ;
* FieldPath = IDENT { "." IDENT } ;
* Verb = ":" LITERAL ;
*
* The syntax `*` matches a single URL path segment. The syntax `**` matches
* zero or more URL path segments, which must be the last part of the URL path
* except the `Verb`.
*
* The syntax `Variable` matches part of the URL path as specified by its
* template. A variable template must not contain other variables. If a variable
* matches a single path segment, its template may be omitted, e.g. `{var}`
* is equivalent to `{var=*}`.
*
* The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
* contains any reserved character, such characters should be percent-encoded
* before the matching.
*
* If a variable contains exactly one path segment, such as `"{var}"` or
* `"{var=*}"`, when such a variable is expanded into a URL path on the client
* side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
* server side does the reverse decoding. Such variables show up in the
* [Discovery
* Document](https://developers.google.com/discovery/v1/reference/apis) as
* `{var}`.
*
* If a variable contains multiple path segments, such as `"{var=foo/*}"`
* or `"{var=**}"`, when such a variable is expanded into a URL path on the
* client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
* The server side does the reverse decoding, except "%2F" and "%2f" are left
* unchanged. Such variables show up in the
* [Discovery
* Document](https://developers.google.com/discovery/v1/reference/apis) as
* `{+var}`.
*
* ## Using gRPC API Service Configuration
*
* gRPC API Service Configuration (service config) is a configuration language
* for configuring a gRPC service to become a user-facing product. The
* service config is simply the YAML representation of the `google.api.Service`
* proto message.
*
* As an alternative to annotating your proto file, you can configure gRPC
* transcoding in your service config YAML files. You do this by specifying a
* `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
* effect as the proto annotation. This can be particularly useful if you
* have a proto that is reused in multiple services. Note that any transcoding
* specified in the service config will override any matching transcoding
* configuration in the proto.
*
* Example:
*
* http:
* rules:
* # Selects a gRPC method and applies HttpRule to it.
* - selector: example.v1.Messaging.GetMessage
* get: /v1/messages/{message_id}/{sub.subfield}
*
* ## Special notes
*
* When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
* proto to JSON conversion must follow the [proto3
* specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
* While the single segment variable follows the semantics of
* [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
* Expansion, the multi segment variable **does not** follow RFC 6570 Section
* 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
* does not expand special characters like `?` and `#`, which would lead
* to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
* for multi segment variables.
*
* The path variables **must not** refer to any repeated or mapped field,
* because client libraries are not capable of handling such variable expansion.
*
* The path variables **must not** capture the leading "/" character. The reason
* is that the most common use case "{var}" does not capture the leading "/"
* character. For consistency, all path variables must share the same behavior.
*
* Repeated message fields must not be mapped to URL query parameters, because
* no client library can support such complicated mapping.
*
* If an API needs to use a JSON array for request or response body, it can map
* the request or response body to a repeated field. However, some gRPC
* Transcoding implementations may not support this feature.
*
* @generated from message google.api.HttpRule
*/
export class HttpRule extends Message<HttpRule> {
/**
* Selects a method to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
* @generated from field: string selector = 1;
*/
selector = "";
/**
* Determines the URL pattern is matched by this rules. This pattern can be
* used with any of the {get|put|post|delete|patch} methods. A custom method
* can be defined using the 'custom' field.
*
* @generated from oneof google.api.HttpRule.pattern
*/
pattern: {
/**
* Maps to HTTP GET. Used for listing and getting information about
* resources.
*
* @generated from field: string get = 2;
*/
value: string;
case: "get";
} | {
/**
* Maps to HTTP PUT. Used for replacing a resource.
*
* @generated from field: string put = 3;
*/
value: string;
case: "put";
} | {
/**
* Maps to HTTP POST. Used for creating a resource or performing an action.
*
* @generated from field: string post = 4;
*/
value: string;
case: "post";
} | {
/**
* Maps to HTTP DELETE. Used for deleting a resource.
*
* @generated from field: string delete = 5;
*/
value: string;
case: "delete";
} | {
/**
* Maps to HTTP PATCH. Used for updating a resource.
*
* @generated from field: string patch = 6;
*/
value: string;
case: "patch";
} | {
/**
* The custom pattern is used for specifying an HTTP method that is not
* included in the `pattern` field, such as HEAD, or "*" to leave the
* HTTP method unspecified for this rule. The wild-card rule is useful
* for services that provide content to Web (HTML) clients.
*
* @generated from field: google.api.CustomHttpPattern custom = 8;
*/
value: CustomHttpPattern;
case: "custom";
} | { case: undefined; value?: undefined } = { case: undefined };
/**
* The name of the request field whose value is mapped to the HTTP request
* body, or `*` for mapping all request fields not captured by the path
* pattern to the HTTP body, or omitted for not having any HTTP request body.
*
* NOTE: the referred field must be present at the top-level of the request
* message type.
*
* @generated from field: string body = 7;
*/
body = "";
/**
* Optional. The name of the response field whose value is mapped to the HTTP
* response body. When omitted, the entire response message will be used
* as the HTTP response body.
*
* NOTE: The referred field must be present at the top-level of the response
* message type.
*
* @generated from field: string response_body = 12;
*/
responseBody = "";
/**
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
*
* @generated from field: repeated google.api.HttpRule additional_bindings = 11;
*/
additionalBindings: HttpRule[] = [];
constructor(data?: PartialMessage<HttpRule>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.HttpRule";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "selector", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "get", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 3, name: "put", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 4, name: "post", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 5, name: "delete", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 6, name: "patch", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 8, name: "custom", kind: "message", T: CustomHttpPattern, oneof: "pattern" },
{ no: 7, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "response_body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "additional_bindings", kind: "message", T: HttpRule, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HttpRule {
return new HttpRule().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HttpRule {
return new HttpRule().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HttpRule {
return new HttpRule().fromJsonString(jsonString, options);
}
static equals(a: HttpRule | PlainMessage<HttpRule> | undefined, b: HttpRule | PlainMessage<HttpRule> | undefined): boolean {
return proto3.util.equals(HttpRule, a, b);
}
}
/**
* A custom pattern is used for defining custom HTTP verb.
*
* @generated from message google.api.CustomHttpPattern
*/
export class CustomHttpPattern extends Message<CustomHttpPattern> {
/**
* The name of this custom HTTP verb.
*
* @generated from field: string kind = 1;
*/
kind = "";
/**
* The path matched by this custom verb.
*
* @generated from field: string path = 2;
*/
path = "";
constructor(data?: PartialMessage<CustomHttpPattern>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.CustomHttpPattern";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CustomHttpPattern {
return new CustomHttpPattern().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CustomHttpPattern {
return new CustomHttpPattern().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CustomHttpPattern {
return new CustomHttpPattern().fromJsonString(jsonString, options);
}
static equals(a: CustomHttpPattern | PlainMessage<CustomHttpPattern> | undefined, b: CustomHttpPattern | PlainMessage<CustomHttpPattern> | undefined): boolean {
return proto3.util.equals(CustomHttpPattern, a, b);
}
}

View File

@@ -1,119 +0,0 @@
// Copyright 2020 Google LLC
//
// 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/api/httpbody.proto (package google.api, 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";
/**
* Message that represents an arbitrary HTTP body. It should only be used for
* payload formats that can't be represented as JSON, such as raw binary or
* an HTML page.
*
*
* This message can be used both in streaming and non-streaming API methods in
* the request as well as the response.
*
* It can be used as a top-level request field, which is convenient if one
* wants to extract parameters from either the URL or HTTP template into the
* request fields and also want access to the raw HTTP body.
*
* Example:
*
* message GetResourceRequest {
* // A unique request id.
* string request_id = 1;
*
* // The raw HTTP body is bound to this field.
* google.api.HttpBody http_body = 2;
* }
*
* service ResourceService {
* rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
* rpc UpdateResource(google.api.HttpBody) returns
* (google.protobuf.Empty);
* }
*
* Example with streaming methods:
*
* service CaldavService {
* rpc GetCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* rpc UpdateCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* }
*
* Use of this type only changes how the request and response bodies are
* handled, all other features will continue to work unchanged.
*
* @generated from message google.api.HttpBody
*/
export class HttpBody extends Message<HttpBody> {
/**
* The HTTP Content-Type header value specifying the content type of the body.
*
* @generated from field: string content_type = 1;
*/
contentType = "";
/**
* The HTTP request/response body as raw binary.
*
* @generated from field: bytes data = 2;
*/
data = new Uint8Array(0);
/**
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
*
* @generated from field: repeated google.protobuf.Any extensions = 3;
*/
extensions: Any[] = [];
constructor(data?: PartialMessage<HttpBody>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.HttpBody";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "content_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 3, name: "extensions", kind: "message", T: Any, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HttpBody {
return new HttpBody().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HttpBody {
return new HttpBody().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HttpBody {
return new HttpBody().fromJsonString(jsonString, options);
}
static equals(a: HttpBody | PlainMessage<HttpBody> | undefined, b: HttpBody | PlainMessage<HttpBody> | undefined): boolean {
return proto3.util.equals(HttpBody, a, b);
}
}

View File

@@ -1,298 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/any.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, IMessageTypeRegistry, JsonReadOptions, JsonValue, JsonWriteOptions, MessageType, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
*
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
*
* Example 1: Pack and unpack a message in C++.
*
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* }
*
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
*
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := ptypes.MarshalAny(foo)
* ...
* foo := &pb.Foo{}
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
* ...
* }
*
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
*
*
* JSON
* ====
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
*
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* }
*
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
*
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message [google.protobuf.Duration][]):
*
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
*
*
* @generated from message google.protobuf.Any
*/
export class Any extends Message<Any> {
/**
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
*
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
*
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
*
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*
*
* @generated from field: string type_url = 1;
*/
typeUrl = "";
/**
* Must be a valid serialized protocol buffer of the above specified type.
*
* @generated from field: bytes value = 2;
*/
value = new Uint8Array(0);
constructor(data?: PartialMessage<Any>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
if (this.typeUrl === "") {
return {};
}
const typeName = this.typeUrlToName(this.typeUrl);
const messageType = options?.typeRegistry?.findMessage(typeName);
if (!messageType) {
throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);
}
const message = messageType.fromBinary(this.value);
let json = message.toJson(options);
if (typeName.startsWith("google.protobuf.") || (json === null || Array.isArray(json) || typeof json !== "object")) {
json = {value: json};
}
json["@type"] = this.typeUrl;
return json;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (json === null || Array.isArray(json) || typeof json != "object") {
throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${json === null ? "null" : Array.isArray(json) ? "array" : typeof json}`);
}
if (Object.keys(json).length == 0) {
return this;
}
const typeUrl = json["@type"];
if (typeof typeUrl != "string" || typeUrl == "") {
throw new Error(`cannot decode message google.protobuf.Any from JSON: "@type" is empty`);
}
const typeName = this.typeUrlToName(typeUrl), messageType = options?.typeRegistry?.findMessage(typeName);
if (!messageType) {
throw new Error(`cannot decode message google.protobuf.Any from JSON: ${typeUrl} is not in the type registry`);
}
let message;
if (typeName.startsWith("google.protobuf.") && Object.prototype.hasOwnProperty.call(json, "value")) {
message = messageType.fromJson(json["value"], options);
} else {
const copy = Object.assign({}, json);
delete copy["@type"];
message = messageType.fromJson(copy, options);
}
this.packFrom(message);
return this;
}
packFrom(message: Message): void {
this.value = message.toBinary();
this.typeUrl = this.typeNameToUrl(message.getType().typeName);
}
unpackTo(target: Message): boolean {
if (!this.is(target.getType())) {
return false;
}
target.fromBinary(this.value);
return true;
}
unpack(registry: IMessageTypeRegistry): Message | undefined {
if (this.typeUrl === "") {
return undefined;
}
const messageType = registry.findMessage(this.typeUrlToName(this.typeUrl));
if (!messageType) {
return undefined;
}
return messageType.fromBinary(this.value);
}
is(type: MessageType | string): boolean {
if (this.typeUrl === '') {
return false;
}
const name = this.typeUrlToName(this.typeUrl);
let typeName = '';
if (typeof type === 'string') {
typeName = type;
} else {
typeName = type.typeName;
}
return name === typeName;
}
private typeNameToUrl(name: string): string {
return `type.googleapis.com/${name}`;
}
private typeUrlToName(url: string): string {
if (!url.length) {
throw new Error(`invalid type url: ${url}`);
}
const slash = url.lastIndexOf("/");
const name = slash >= 0 ? url.substring(slash + 1) : url;
if (!name.length) {
throw new Error(`invalid type url: ${url}`);
}
return name;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Any";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
static pack(message: Message): Any {
const any = new Any();
any.packFrom(message);
return any;
}
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Any {
return new Any().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Any {
return new Any().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Any {
return new Any().fromJsonString(jsonString, options);
}
static equals(a: Any | PlainMessage<Any> | undefined, b: Any | PlainMessage<Any> | undefined): boolean {
return proto3.util.equals(Any, a, b);
}
}

View File

@@ -1,375 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/api.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { Option, Syntax } from "./type_pb.js";
import { SourceContext } from "./source_context_pb.js";
/**
* Api is a light-weight descriptor for an API Interface.
*
* Interfaces are also described as "protocol buffer services" in some contexts,
* such as by the "service" keyword in a .proto file, but they are different
* from API Services, which represent a concrete implementation of an interface
* as opposed to simply a description of methods and bindings. They are also
* sometimes simply referred to as "APIs" in other contexts, such as the name of
* this message itself. See https://cloud.google.com/apis/design/glossary for
* detailed terminology.
*
* @generated from message google.protobuf.Api
*/
export class Api extends Message<Api> {
/**
* The fully qualified name of this interface, including package name
* followed by the interface's simple name.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* The methods of this interface, in unspecified order.
*
* @generated from field: repeated google.protobuf.Method methods = 2;
*/
methods: Method[] = [];
/**
* Any metadata attached to the interface.
*
* @generated from field: repeated google.protobuf.Option options = 3;
*/
options: Option[] = [];
/**
* A version string for this interface. If specified, must have the form
* `major-version.minor-version`, as in `1.10`. If the minor version is
* omitted, it defaults to zero. If the entire version field is empty, the
* major version is derived from the package name, as outlined below. If the
* field is not empty, the version in the package name will be verified to be
* consistent with what is provided here.
*
* The versioning schema uses [semantic
* versioning](http://semver.org) where the major version number
* indicates a breaking change and the minor version an additive,
* non-breaking change. Both version numbers are signals to users
* what to expect from different versions, and should be carefully
* chosen based on the product plan.
*
* The major version is also reflected in the package name of the
* interface, which must end in `v<major-version>`, as in
* `google.feature.v1`. For major versions 0 and 1, the suffix can
* be omitted. Zero major versions must only be used for
* experimental, non-GA interfaces.
*
*
*
* @generated from field: string version = 4;
*/
version = "";
/**
* Source context for the protocol buffer service represented by this
* message.
*
* @generated from field: google.protobuf.SourceContext source_context = 5;
*/
sourceContext?: SourceContext;
/**
* Included interfaces. See [Mixin][].
*
* @generated from field: repeated google.protobuf.Mixin mixins = 6;
*/
mixins: Mixin[] = [];
/**
* The source syntax of the service.
*
* @generated from field: google.protobuf.Syntax syntax = 7;
*/
syntax = Syntax.PROTO2;
constructor(data?: PartialMessage<Api>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Api";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "methods", kind: "message", T: Method, repeated: true },
{ no: 3, name: "options", kind: "message", T: Option, repeated: true },
{ no: 4, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "source_context", kind: "message", T: SourceContext },
{ no: 6, name: "mixins", kind: "message", T: Mixin, repeated: true },
{ no: 7, name: "syntax", kind: "enum", T: proto3.getEnumType(Syntax) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Api {
return new Api().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Api {
return new Api().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Api {
return new Api().fromJsonString(jsonString, options);
}
static equals(a: Api | PlainMessage<Api> | undefined, b: Api | PlainMessage<Api> | undefined): boolean {
return proto3.util.equals(Api, a, b);
}
}
/**
* Method represents a method of an API interface.
*
* @generated from message google.protobuf.Method
*/
export class Method extends Message<Method> {
/**
* The simple name of this method.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* A URL of the input message type.
*
* @generated from field: string request_type_url = 2;
*/
requestTypeUrl = "";
/**
* If true, the request is streamed.
*
* @generated from field: bool request_streaming = 3;
*/
requestStreaming = false;
/**
* The URL of the output message type.
*
* @generated from field: string response_type_url = 4;
*/
responseTypeUrl = "";
/**
* If true, the response is streamed.
*
* @generated from field: bool response_streaming = 5;
*/
responseStreaming = false;
/**
* Any metadata attached to the method.
*
* @generated from field: repeated google.protobuf.Option options = 6;
*/
options: Option[] = [];
/**
* The source syntax of this method.
*
* @generated from field: google.protobuf.Syntax syntax = 7;
*/
syntax = Syntax.PROTO2;
constructor(data?: PartialMessage<Method>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Method";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "request_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "request_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 4, name: "response_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "response_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 6, name: "options", kind: "message", T: Option, repeated: true },
{ no: 7, name: "syntax", kind: "enum", T: proto3.getEnumType(Syntax) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Method {
return new Method().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Method {
return new Method().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Method {
return new Method().fromJsonString(jsonString, options);
}
static equals(a: Method | PlainMessage<Method> | undefined, b: Method | PlainMessage<Method> | undefined): boolean {
return proto3.util.equals(Method, a, b);
}
}
/**
* Declares an API Interface to be included in this interface. The including
* interface must redeclare all the methods from the included interface, but
* documentation and options are inherited as follows:
*
* - If after comment and whitespace stripping, the documentation
* string of the redeclared method is empty, it will be inherited
* from the original method.
*
* - Each annotation belonging to the service config (http,
* visibility) which is not set in the redeclared method will be
* inherited.
*
* - If an http annotation is inherited, the path pattern will be
* modified as follows. Any version prefix will be replaced by the
* version of the including interface plus the [root][] path if
* specified.
*
* Example of a simple mixin:
*
* package google.acl.v1;
* service AccessControl {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v1/{resource=**}:getAcl";
* }
* }
*
* package google.storage.v2;
* service Storage {
* rpc GetAcl(GetAclRequest) returns (Acl);
*
* // Get a data record.
* rpc GetData(GetDataRequest) returns (Data) {
* option (google.api.http).get = "/v2/{resource=**}";
* }
* }
*
* Example of a mixin configuration:
*
* apis:
* - name: google.storage.v2.Storage
* mixins:
* - name: google.acl.v1.AccessControl
*
* The mixin construct implies that all methods in `AccessControl` are
* also declared with same name and request/response types in
* `Storage`. A documentation generator or annotation processor will
* see the effective `Storage.GetAcl` method after inherting
* documentation and annotations as follows:
*
* service Storage {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v2/{resource=**}:getAcl";
* }
* ...
* }
*
* Note how the version in the path pattern changed from `v1` to `v2`.
*
* If the `root` field in the mixin is specified, it should be a
* relative path under which inherited HTTP paths are placed. Example:
*
* apis:
* - name: google.storage.v2.Storage
* mixins:
* - name: google.acl.v1.AccessControl
* root: acls
*
* This implies the following inherited HTTP annotation:
*
* service Storage {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
* }
* ...
* }
*
* @generated from message google.protobuf.Mixin
*/
export class Mixin extends Message<Mixin> {
/**
* The fully qualified name of the interface which is included.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* If non-empty specifies a path under which inherited HTTP paths
* are rooted.
*
* @generated from field: string root = 2;
*/
root = "";
constructor(data?: PartialMessage<Mixin>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Mixin";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "root", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Mixin {
return new Mixin().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Mixin {
return new Mixin().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Mixin {
return new Mixin().fromJsonString(jsonString, options);
}
static equals(a: Mixin | PlainMessage<Mixin> | undefined, b: Mixin | PlainMessage<Mixin> | undefined): boolean {
return proto3.util.equals(Mixin, a, b);
}
}

View File

@@ -1,352 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Author: kenton@google.com (Kenton Varda)
//
// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
// change.
//
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
// just a program that reads a CodeGeneratorRequest from stdin and writes a
// CodeGeneratorResponse to stdout.
//
// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
// of dealing with the raw protocol defined here.
//
// A plugin executable needs only to be placed somewhere in the path. The
// plugin should be named "protoc-gen-$NAME", and will then be used when the
// flag "--${NAME}_out" is passed to protoc.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/compiler/plugin.proto (package google.protobuf.compiler, syntax proto2)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto2 } from "@bufbuild/protobuf";
import { FileDescriptorProto } from "../descriptor_pb.js";
/**
* The version number of protocol compiler.
*
* @generated from message google.protobuf.compiler.Version
*/
export class Version extends Message<Version> {
/**
* @generated from field: optional int32 major = 1;
*/
major?: number;
/**
* @generated from field: optional int32 minor = 2;
*/
minor?: number;
/**
* @generated from field: optional int32 patch = 3;
*/
patch?: number;
/**
* A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
* be empty for mainline stable releases.
*
* @generated from field: optional string suffix = 4;
*/
suffix?: string;
constructor(data?: PartialMessage<Version>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "google.protobuf.compiler.Version";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "major", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 2, name: "minor", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 3, name: "patch", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 4, name: "suffix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Version {
return new Version().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Version {
return new Version().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Version {
return new Version().fromJsonString(jsonString, options);
}
static equals(a: Version | PlainMessage<Version> | undefined, b: Version | PlainMessage<Version> | undefined): boolean {
return proto2.util.equals(Version, a, b);
}
}
/**
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
*
* @generated from message google.protobuf.compiler.CodeGeneratorRequest
*/
export class CodeGeneratorRequest extends Message<CodeGeneratorRequest> {
/**
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
* @generated from field: repeated string file_to_generate = 1;
*/
fileToGenerate: string[] = [];
/**
* The generator parameter passed on the command-line.
*
* @generated from field: optional string parameter = 2;
*/
parameter?: string;
/**
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
*
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
* Type names of fields and extensions in the FileDescriptorProto are always
* fully qualified.
*
* @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
*/
protoFile: FileDescriptorProto[] = [];
/**
* The version number of protocol compiler.
*
* @generated from field: optional google.protobuf.compiler.Version compiler_version = 3;
*/
compilerVersion?: Version;
constructor(data?: PartialMessage<CodeGeneratorRequest>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "google.protobuf.compiler.CodeGeneratorRequest";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "file_to_generate", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 2, name: "parameter", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 15, name: "proto_file", kind: "message", T: FileDescriptorProto, repeated: true },
{ no: 3, name: "compiler_version", kind: "message", T: Version, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorRequest {
return new CodeGeneratorRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorRequest {
return new CodeGeneratorRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorRequest {
return new CodeGeneratorRequest().fromJsonString(jsonString, options);
}
static equals(a: CodeGeneratorRequest | PlainMessage<CodeGeneratorRequest> | undefined, b: CodeGeneratorRequest | PlainMessage<CodeGeneratorRequest> | undefined): boolean {
return proto2.util.equals(CodeGeneratorRequest, a, b);
}
}
/**
* The plugin writes an encoded CodeGeneratorResponse to stdout.
*
* @generated from message google.protobuf.compiler.CodeGeneratorResponse
*/
export class CodeGeneratorResponse extends Message<CodeGeneratorResponse> {
/**
* Error message. If non-empty, code generation failed. The plugin process
* should exit with status code zero even if it reports an error in this way.
*
* This should be used to indicate errors in .proto files which prevent the
* code generator from generating correct code. Errors which indicate a
* problem in protoc itself -- such as the input CodeGeneratorRequest being
* unparseable -- should be reported by writing a message to stderr and
* exiting with a non-zero status code.
*
* @generated from field: optional string error = 1;
*/
error?: string;
/**
* @generated from field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
file: CodeGeneratorResponse_File[] = [];
constructor(data?: PartialMessage<CodeGeneratorResponse>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "google.protobuf.compiler.CodeGeneratorResponse";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 15, name: "file", kind: "message", T: CodeGeneratorResponse_File, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorResponse {
return new CodeGeneratorResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorResponse {
return new CodeGeneratorResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorResponse {
return new CodeGeneratorResponse().fromJsonString(jsonString, options);
}
static equals(a: CodeGeneratorResponse | PlainMessage<CodeGeneratorResponse> | undefined, b: CodeGeneratorResponse | PlainMessage<CodeGeneratorResponse> | undefined): boolean {
return proto2.util.equals(CodeGeneratorResponse, a, b);
}
}
/**
* Represents a single generated file.
*
* @generated from message google.protobuf.compiler.CodeGeneratorResponse.File
*/
export class CodeGeneratorResponse_File extends Message<CodeGeneratorResponse_File> {
/**
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
*
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
* @generated from field: optional string name = 1;
*/
name?: string;
/**
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
*
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
*
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
*
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
*
* If |insertion_point| is present, |name| must also be present.
*
* @generated from field: optional string insertion_point = 2;
*/
insertionPoint?: string;
/**
* The file contents.
*
* @generated from field: optional string content = 15;
*/
content?: string;
constructor(data?: PartialMessage<CodeGeneratorResponse_File>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "google.protobuf.compiler.CodeGeneratorResponse.File";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 2, name: "insertion_point", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 15, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorResponse_File {
return new CodeGeneratorResponse_File().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorResponse_File {
return new CodeGeneratorResponse_File().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorResponse_File {
return new CodeGeneratorResponse_File().fromJsonString(jsonString, options);
}
static equals(a: CodeGeneratorResponse_File | PlainMessage<CodeGeneratorResponse_File> | undefined, b: CodeGeneratorResponse_File | PlainMessage<CodeGeneratorResponse_File> | undefined): boolean {
return proto2.util.equals(CodeGeneratorResponse_File, a, b);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,197 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/duration.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
/**
* A Duration represents a signed, fixed-length span of time represented
* as a count of seconds and fractions of seconds at nanosecond
* resolution. It is independent of any calendar and concepts like "day"
* or "month". It is related to Timestamp in that the difference between
* two Timestamp values is a Duration and it can be added or subtracted
* from a Timestamp. Range is approximately +-10,000 years.
*
* # Examples
*
* Example 1: Compute Duration from two Timestamps in pseudo code.
*
* Timestamp start = ...;
* Timestamp end = ...;
* Duration duration = ...;
*
* duration.seconds = end.seconds - start.seconds;
* duration.nanos = end.nanos - start.nanos;
*
* if (duration.seconds < 0 && duration.nanos > 0) {
* duration.seconds += 1;
* duration.nanos -= 1000000000;
* } else if (duration.seconds > 0 && duration.nanos < 0) {
* duration.seconds -= 1;
* duration.nanos += 1000000000;
* }
*
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
*
* Timestamp start = ...;
* Duration duration = ...;
* Timestamp end = ...;
*
* end.seconds = start.seconds + duration.seconds;
* end.nanos = start.nanos + duration.nanos;
*
* if (end.nanos < 0) {
* end.seconds -= 1;
* end.nanos += 1000000000;
* } else if (end.nanos >= 1000000000) {
* end.seconds += 1;
* end.nanos -= 1000000000;
* }
*
* Example 3: Compute Duration from datetime.timedelta in Python.
*
* td = datetime.timedelta(days=3, minutes=10)
* duration = Duration()
* duration.FromTimedelta(td)
*
* # JSON Mapping
*
* In JSON format, the Duration type is encoded as a string rather than an
* object, where the string ends in the suffix "s" (indicating seconds) and
* is preceded by the number of seconds, with nanoseconds expressed as
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
* microsecond should be expressed in JSON format as "3.000001s".
*
*
*
* @generated from message google.protobuf.Duration
*/
export class Duration extends Message<Duration> {
/**
* Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*
* @generated from field: int64 seconds = 1;
*/
seconds = protoInt64.zero;
/**
* Signed fractions of a second at nanosecond resolution of the span
* of time. Durations less than one second are represented with a 0
* `seconds` field and a positive or negative `nanos` field. For durations
* of one second or more, a non-zero value for the `nanos` field must be
* of the same sign as the `seconds` field. Must be from -999,999,999
* to +999,999,999 inclusive.
*
* @generated from field: int32 nanos = 2;
*/
nanos = 0;
constructor(data?: PartialMessage<Duration>) {
super();
proto3.util.initPartial(data, this);
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (typeof json !== "string") {
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
}
const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
if (match === null) {
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
}
const longSeconds = Number(match[1]);
if (longSeconds > 315576000000 || longSeconds < -315576000000) {
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
}
this.seconds = protoInt64.parse(longSeconds);
if (typeof match[2] == "string") {
const nanosStr = match[2] + "0".repeat(9 - match[2].length);
this.nanos = parseInt(nanosStr);
if (longSeconds < 0 || Object.is(longSeconds, -0)) {
this.nanos = -this.nanos;
}
}
return this;
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
if (Number(this.seconds) > 315576000000 || Number(this.seconds) < -315576000000) {
throw new Error(`cannot encode google.protobuf.Duration to JSON: value out of range`);
}
let text = this.seconds.toString();
if (this.nanos !== 0) {
let nanosStr = Math.abs(this.nanos).toString();
nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
if (nanosStr.substring(3) === "000000") {
nanosStr = nanosStr.substring(0, 3);
} else if (nanosStr.substring(6) === "000") {
nanosStr = nanosStr.substring(0, 6);
}
text += "." + nanosStr;
if (this.nanos < 0 && Number(this.seconds) == 0) {
text = "-" + text;
}
}
return text + "s";
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Duration";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Duration {
return new Duration().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Duration {
return new Duration().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Duration {
return new Duration().fromJsonString(jsonString, options);
}
static equals(a: Duration | PlainMessage<Duration> | undefined, b: Duration | PlainMessage<Duration> | undefined): boolean {
return proto3.util.equals(Duration, a, b);
}
}

View File

@@ -1,79 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/empty.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
*
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
*
* The JSON representation for `Empty` is empty JSON object `{}`.
*
* @generated from message google.protobuf.Empty
*/
export class Empty extends Message<Empty> {
constructor(data?: PartialMessage<Empty>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Empty";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Empty {
return new Empty().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Empty {
return new Empty().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Empty {
return new Empty().fromJsonString(jsonString, options);
}
static equals(a: Empty | PlainMessage<Empty> | undefined, b: Empty | PlainMessage<Empty> | undefined): boolean {
return proto3.util.equals(Empty, a, b);
}
}

View File

@@ -1,339 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/field_mask.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* `FieldMask` represents a set of symbolic field paths, for example:
*
* paths: "f.a"
* paths: "f.b.d"
*
* Here `f` represents a field in some root message, `a` and `b`
* fields in the message found in `f`, and `d` a field found in the
* message in `f.b`.
*
* Field masks are used to specify a subset of fields that should be
* returned by a get operation or modified by an update operation.
* Field masks also have a custom JSON encoding (see below).
*
* # Field Masks in Projections
*
* When used in the context of a projection, a response message or
* sub-message is filtered by the API to only contain those fields as
* specified in the mask. For example, if the mask in the previous
* example is applied to a response message as follows:
*
* f {
* a : 22
* b {
* d : 1
* x : 2
* }
* y : 13
* }
* z: 8
*
* The result will not contain specific values for fields x,y and z
* (their value will be set to the default, and omitted in proto text
* output):
*
*
* f {
* a : 22
* b {
* d : 1
* }
* }
*
* A repeated field is not allowed except at the last position of a
* paths string.
*
* If a FieldMask object is not present in a get operation, the
* operation applies to all fields (as if a FieldMask of all fields
* had been specified).
*
* Note that a field mask does not necessarily apply to the
* top-level response message. In case of a REST get operation, the
* field mask applies directly to the response, but in case of a REST
* list operation, the mask instead applies to each individual message
* in the returned resource list. In case of a REST custom method,
* other definitions may be used. Where the mask applies will be
* clearly documented together with its declaration in the API. In
* any case, the effect on the returned resource/resources is required
* behavior for APIs.
*
* # Field Masks in Update Operations
*
* A field mask in update operations specifies which fields of the
* targeted resource are going to be updated. The API is required
* to only change the values of the fields as specified in the mask
* and leave the others untouched. If a resource is passed in to
* describe the updated values, the API ignores the values of all
* fields not covered by the mask.
*
* If a repeated field is specified for an update operation, new values will
* be appended to the existing repeated field in the target resource. Note that
* a repeated field is only allowed in the last position of a `paths` string.
*
* If a sub-message is specified in the last position of the field mask for an
* update operation, then new value will be merged into the existing sub-message
* in the target resource.
*
* For example, given the target message:
*
* f {
* b {
* d: 1
* x: 2
* }
* c: [1]
* }
*
* And an update message:
*
* f {
* b {
* d: 10
* }
* c: [2]
* }
*
* then if the field mask is:
*
* paths: ["f.b", "f.c"]
*
* then the result will be:
*
* f {
* b {
* d: 10
* x: 2
* }
* c: [1, 2]
* }
*
* An implementation may provide options to override this default behavior for
* repeated and message fields.
*
* In order to reset a field's value to the default, the field must
* be in the mask and set to the default value in the provided resource.
* Hence, in order to reset all fields of a resource, provide a default
* instance of the resource and set all fields in the mask, or do
* not provide a mask as described below.
*
* If a field mask is not present on update, the operation applies to
* all fields (as if a field mask of all fields has been specified).
* Note that in the presence of schema evolution, this may mean that
* fields the client does not know and has therefore not filled into
* the request will be reset to their default. If this is unwanted
* behavior, a specific service may require a client to always specify
* a field mask, producing an error if not.
*
* As with get operations, the location of the resource which
* describes the updated values in the request message depends on the
* operation kind. In any case, the effect of the field mask is
* required to be honored by the API.
*
* ## Considerations for HTTP REST
*
* The HTTP kind of an update operation which uses a field mask must
* be set to PATCH instead of PUT in order to satisfy HTTP semantics
* (PUT must only be used for full updates).
*
* # JSON Encoding of Field Masks
*
* In JSON, a field mask is encoded as a single string where paths are
* separated by a comma. Fields name in each path are converted
* to/from lower-camel naming conventions.
*
* As an example, consider the following message declarations:
*
* message Profile {
* User user = 1;
* Photo photo = 2;
* }
* message User {
* string display_name = 1;
* string address = 2;
* }
*
* In proto a field mask for `Profile` may look as such:
*
* mask {
* paths: "user.display_name"
* paths: "photo"
* }
*
* In JSON, the same mask is represented as below:
*
* {
* mask: "user.displayName,photo"
* }
*
* # Field Masks and Oneof Fields
*
* Field masks treat fields in oneofs just as regular fields. Consider the
* following message:
*
* message SampleMessage {
* oneof test_oneof {
* string name = 4;
* SubMessage sub_message = 9;
* }
* }
*
* The field mask can be:
*
* mask {
* paths: "name"
* }
*
* Or:
*
* mask {
* paths: "sub_message"
* }
*
* Note that oneof type names ("test_oneof" in this case) cannot be used in
* paths.
*
* ## Field Mask Verification
*
* The implementation of any API method which has a FieldMask type field in the
* request should verify the included field paths, and return an
* `INVALID_ARGUMENT` error if any path is unmappable.
*
* @generated from message google.protobuf.FieldMask
*/
export class FieldMask extends Message<FieldMask> {
/**
* The set of field mask paths.
*
* @generated from field: repeated string paths = 1;
*/
paths: string[] = [];
constructor(data?: PartialMessage<FieldMask>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
// Converts snake_case to protoCamelCase according to the convention
// used by protoc to convert a field name to a JSON name.
function protoCamelCase(snakeCase: string): string {
let capNext = false;
const b = [];
for (let i = 0; i < snakeCase.length; i++) {
let c = snakeCase.charAt(i);
switch (c) {
case '_':
capNext = true;
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
b.push(c);
capNext = false;
break;
default:
if (capNext) {
capNext = false;
c = c.toUpperCase();
}
b.push(c);
break;
}
}
return b.join('');
}
return this.paths.map(p => {
if (p.match(/_[0-9]?_/g) || p.match(/[A-Z]/g)) {
throw new Error("cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name \"" + p + "\" is irreversible");
}
return protoCamelCase(p);
}).join(",");
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (typeof json !== "string") {
throw new Error("cannot decode google.protobuf.FieldMask from JSON: " + proto3.json.debug(json));
}
if (json === "") {
return this;
}
function camelToSnake (str: string) {
if (str.includes("_")) {
throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");
}
const sc = str.replace(/[A-Z]/g, letter => "_" + letter.toLowerCase());
return (sc[0] === "_") ? sc.substring(1) : sc;
}
this.paths = json.split(",").map(camelToSnake);
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.FieldMask";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FieldMask {
return new FieldMask().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FieldMask {
return new FieldMask().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FieldMask {
return new FieldMask().fromJsonString(jsonString, options);
}
static equals(a: FieldMask | PlainMessage<FieldMask> | undefined, b: FieldMask | PlainMessage<FieldMask> | undefined): boolean {
return proto3.util.equals(FieldMask, a, b);
}
}

View File

@@ -1,81 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/source_context.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* `SourceContext` represents information about the source of a
* protobuf element, like the file in which it is defined.
*
* @generated from message google.protobuf.SourceContext
*/
export class SourceContext extends Message<SourceContext> {
/**
* The path-qualified name of the .proto file that contained the associated
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
*
* @generated from field: string file_name = 1;
*/
fileName = "";
constructor(data?: PartialMessage<SourceContext>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.SourceContext";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SourceContext {
return new SourceContext().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SourceContext {
return new SourceContext().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SourceContext {
return new SourceContext().fromJsonString(jsonString, options);
}
static equals(a: SourceContext | PlainMessage<SourceContext> | undefined, b: SourceContext | PlainMessage<SourceContext> | undefined): boolean {
return proto3.util.equals(SourceContext, a, b);
}
}

View File

@@ -1,327 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/struct.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonObject, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
*
* The JSON representation for `NullValue` is JSON `null`.
*
* @generated from enum google.protobuf.NullValue
*/
export enum NullValue {
/**
* Null value.
*
* @generated from enum value: NULL_VALUE = 0;
*/
NULL_VALUE = 0,
}
// Retrieve enum metadata with: proto3.getEnumType(NullValue)
proto3.util.setEnumType(NullValue, "google.protobuf.NullValue", [
{ no: 0, name: "NULL_VALUE" },
]);
/**
* `Struct` represents a structured data value, consisting of fields
* which map to dynamically typed values. In some languages, `Struct`
* might be supported by a native representation. For example, in
* scripting languages like JS a struct is represented as an
* object. The details of that representation are described together
* with the proto support for the language.
*
* The JSON representation for `Struct` is JSON object.
*
* @generated from message google.protobuf.Struct
*/
export class Struct extends Message<Struct> {
/**
* Unordered map of dynamically typed values.
*
* @generated from field: map<string, google.protobuf.Value> fields = 1;
*/
fields: { [key: string]: Value } = {};
constructor(data?: PartialMessage<Struct>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
const json: JsonObject = {}
for (const [k, v] of Object.entries(this.fields)) {
json[k] = v.toJson(options);
}
return json;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (typeof json != "object" || json == null || Array.isArray(json)) {
throw new Error("cannot decode google.protobuf.Struct from JSON " + proto3.json.debug(json));
}
for (const [k, v] of Object.entries(json)) {
this.fields[k] = Value.fromJson(v);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Struct";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "fields", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Struct {
return new Struct().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Struct {
return new Struct().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Struct {
return new Struct().fromJsonString(jsonString, options);
}
static equals(a: Struct | PlainMessage<Struct> | undefined, b: Struct | PlainMessage<Struct> | undefined): boolean {
return proto3.util.equals(Struct, a, b);
}
}
/**
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of that
* variants, absence of any variant indicates an error.
*
* The JSON representation for `Value` is JSON value.
*
* @generated from message google.protobuf.Value
*/
export class Value extends Message<Value> {
/**
* The kind of value.
*
* @generated from oneof google.protobuf.Value.kind
*/
kind: {
/**
* Represents a null value.
*
* @generated from field: google.protobuf.NullValue null_value = 1;
*/
value: NullValue;
case: "nullValue";
} | {
/**
* Represents a double value.
*
* @generated from field: double number_value = 2;
*/
value: number;
case: "numberValue";
} | {
/**
* Represents a string value.
*
* @generated from field: string string_value = 3;
*/
value: string;
case: "stringValue";
} | {
/**
* Represents a boolean value.
*
* @generated from field: bool bool_value = 4;
*/
value: boolean;
case: "boolValue";
} | {
/**
* Represents a structured value.
*
* @generated from field: google.protobuf.Struct struct_value = 5;
*/
value: Struct;
case: "structValue";
} | {
/**
* Represents a repeated `Value`.
*
* @generated from field: google.protobuf.ListValue list_value = 6;
*/
value: ListValue;
case: "listValue";
} | { case: undefined; value?: undefined } = { case: undefined };
constructor(data?: PartialMessage<Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
switch (this.kind.case) {
case "nullValue":
return null;
case "numberValue":
if (!Number.isFinite(this.kind.value)) {
throw new Error("google.protobuf.Value cannot be NaN or Infinity");
}
return this.kind.value;
case "boolValue":
return this.kind.value;
case "stringValue":
return this.kind.value;
case "structValue":
case "listValue":
return this.kind.value.toJson({...options, emitDefaultValues: true});
}
throw new Error("google.protobuf.Value must have a value");
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
switch (typeof json) {
case "number":
this.kind = { case: "numberValue", value: json };
break;
case "string":
this.kind = { case: "stringValue", value: json };
break;
case "boolean":
this.kind = { case: "boolValue", value: json };
break;
case "object":
if (json === null) {
this.kind = { case: "nullValue", value: NullValue.NULL_VALUE };
} else if (Array.isArray(json)) {
this.kind = { case: "listValue", value: ListValue.fromJson(json) };
} else {
this.kind = { case: "structValue", value: Struct.fromJson(json) };
}
break;
default:
throw new Error("cannot decode google.protobuf.Value from JSON " + proto3.json.debug(json));
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "null_value", kind: "enum", T: proto3.getEnumType(NullValue), oneof: "kind" },
{ no: 2, name: "number_value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, oneof: "kind" },
{ no: 3, name: "string_value", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "kind" },
{ no: 4, name: "bool_value", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "kind" },
{ no: 5, name: "struct_value", kind: "message", T: Struct, oneof: "kind" },
{ no: 6, name: "list_value", kind: "message", T: ListValue, oneof: "kind" },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Value {
return new Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Value {
return new Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Value {
return new Value().fromJsonString(jsonString, options);
}
static equals(a: Value | PlainMessage<Value> | undefined, b: Value | PlainMessage<Value> | undefined): boolean {
return proto3.util.equals(Value, a, b);
}
}
/**
* `ListValue` is a wrapper around a repeated field of values.
*
* The JSON representation for `ListValue` is JSON array.
*
* @generated from message google.protobuf.ListValue
*/
export class ListValue extends Message<ListValue> {
/**
* Repeated field of dynamically typed values.
*
* @generated from field: repeated google.protobuf.Value values = 1;
*/
values: Value[] = [];
constructor(data?: PartialMessage<ListValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return this.values.map(v => v.toJson());
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (!Array.isArray(json)) {
throw new Error("cannot decode google.protobuf.ListValue from JSON " + proto3.json.debug(json));
}
for (let e of json) {
this.values.push(Value.fromJson(e));
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.ListValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "values", kind: "message", T: Value, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListValue {
return new ListValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListValue {
return new ListValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListValue {
return new ListValue().fromJsonString(jsonString, options);
}
static equals(a: ListValue | PlainMessage<ListValue> | undefined, b: ListValue | PlainMessage<ListValue> | undefined): boolean {
return proto3.util.equals(ListValue, a, b);
}
}

View File

@@ -1,236 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/timestamp.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
/**
* A Timestamp represents a point in time independent of any time zone or local
* calendar, encoded as a count of seconds and fractions of seconds at
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
* January 1, 1970, in the proleptic Gregorian calendar which extends the
* Gregorian calendar backwards to year one.
*
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
* second table is needed for interpretation, using a [24-hour linear
* smear](https://developers.google.com/time/smear).
*
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
* restricting to that range, we ensure that we can convert to and from [RFC
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
*
* # Examples
*
* Example 1: Compute Timestamp from POSIX `time()`.
*
* Timestamp timestamp;
* timestamp.set_seconds(time(NULL));
* timestamp.set_nanos(0);
*
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
*
* struct timeval tv;
* gettimeofday(&tv, NULL);
*
* Timestamp timestamp;
* timestamp.set_seconds(tv.tv_sec);
* timestamp.set_nanos(tv.tv_usec * 1000);
*
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
*
* FILETIME ft;
* GetSystemTimeAsFileTime(&ft);
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
*
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
* Timestamp timestamp;
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
*
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
*
* long millis = System.currentTimeMillis();
*
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
* .setNanos((int) ((millis % 1000) * 1000000)).build();
*
*
* Example 5: Compute Timestamp from current time in Python.
*
* timestamp = Timestamp()
* timestamp.GetCurrentTime()
*
* # JSON Mapping
*
* In JSON format, the Timestamp type is encoded as a string in the
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
* where {year} is always expressed using four digits while {month}, {day},
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
* is required. A proto3 JSON serializer should always use UTC (as indicated by
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
* able to accept both UTC and other timezones (as indicated by an offset).
*
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
* 01:30 UTC on January 15, 2017.
*
* In JavaScript, one can convert a Date object to this format using the
* standard
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
*
*
*
* @generated from message google.protobuf.Timestamp
*/
export class Timestamp extends Message<Timestamp> {
/**
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*
* @generated from field: int64 seconds = 1;
*/
seconds = protoInt64.zero;
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*
* @generated from field: int32 nanos = 2;
*/
nanos = 0;
constructor(data?: PartialMessage<Timestamp>) {
super();
proto3.util.initPartial(data, this);
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (typeof json !== "string") {
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${proto3.json.debug(json)}`);
}
const matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
if (!matches) {
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string`);
}
const ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
if (Number.isNaN(ms)) {
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string`);
}
if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) {
throw new Error(`cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
}
this.seconds = protoInt64.parse(ms / 1000);
this.nanos = 0;
if (matches[7]) {
this.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000);
}
return this;
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
const ms = Number(this.seconds) * 1000;
if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) {
throw new Error(`cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
}
if (this.nanos < 0) {
throw new Error(`cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative`);
}
let z = "Z";
if (this.nanos > 0) {
const nanosStr = (this.nanos + 1000000000).toString().substring(1);
if (nanosStr.substring(3) === "000000") {
z = "." + nanosStr.substring(0, 3) + "Z";
} else if (nanosStr.substring(6) === "000") {
z = "." + nanosStr.substring(0, 6) + "Z";
} else {
z = "." + nanosStr + "Z";
}
}
return new Date(ms).toISOString().replace(".000Z", z);
}
toDate(): Date {
return new Date(Number(this.seconds) * 1000 + Math.ceil(this.nanos / 1000000));
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Timestamp";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
static now(): Timestamp {
return Timestamp.fromDate(new Date())
}
static fromDate(date: Date): Timestamp {
const ms = date.getTime();
return new Timestamp({
seconds: protoInt64.parse(Math.floor(ms / 1000)),
nanos: (ms % 1000) * 1000000,
});
}
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Timestamp {
return new Timestamp().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Timestamp {
return new Timestamp().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Timestamp {
return new Timestamp().fromJsonString(jsonString, options);
}
static equals(a: Timestamp | PlainMessage<Timestamp> | undefined, b: Timestamp | PlainMessage<Timestamp> | undefined): boolean {
return proto3.util.equals(Timestamp, a, b);
}
}

View File

@@ -1,652 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/type.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { SourceContext } from "./source_context_pb.js";
import { Any } from "./any_pb.js";
/**
* The syntax in which a protocol buffer element is defined.
*
* @generated from enum google.protobuf.Syntax
*/
export enum Syntax {
/**
* Syntax `proto2`.
*
* @generated from enum value: SYNTAX_PROTO2 = 0;
*/
PROTO2 = 0,
/**
* Syntax `proto3`.
*
* @generated from enum value: SYNTAX_PROTO3 = 1;
*/
PROTO3 = 1,
}
// Retrieve enum metadata with: proto3.getEnumType(Syntax)
proto3.util.setEnumType(Syntax, "google.protobuf.Syntax", [
{ no: 0, name: "SYNTAX_PROTO2" },
{ no: 1, name: "SYNTAX_PROTO3" },
]);
/**
* A protocol buffer message type.
*
* @generated from message google.protobuf.Type
*/
export class Type extends Message<Type> {
/**
* The fully qualified message name.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* The list of fields.
*
* @generated from field: repeated google.protobuf.Field fields = 2;
*/
fields: Field[] = [];
/**
* The list of types appearing in `oneof` definitions in this type.
*
* @generated from field: repeated string oneofs = 3;
*/
oneofs: string[] = [];
/**
* The protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 4;
*/
options: Option[] = [];
/**
* The source context.
*
* @generated from field: google.protobuf.SourceContext source_context = 5;
*/
sourceContext?: SourceContext;
/**
* The source syntax.
*
* @generated from field: google.protobuf.Syntax syntax = 6;
*/
syntax = Syntax.PROTO2;
constructor(data?: PartialMessage<Type>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Type";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "fields", kind: "message", T: Field, repeated: true },
{ no: 3, name: "oneofs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 4, name: "options", kind: "message", T: Option, repeated: true },
{ no: 5, name: "source_context", kind: "message", T: SourceContext },
{ no: 6, name: "syntax", kind: "enum", T: proto3.getEnumType(Syntax) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Type {
return new Type().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Type {
return new Type().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Type {
return new Type().fromJsonString(jsonString, options);
}
static equals(a: Type | PlainMessage<Type> | undefined, b: Type | PlainMessage<Type> | undefined): boolean {
return proto3.util.equals(Type, a, b);
}
}
/**
* A single field of a message type.
*
* @generated from message google.protobuf.Field
*/
export class Field extends Message<Field> {
/**
* The field type.
*
* @generated from field: google.protobuf.Field.Kind kind = 1;
*/
kind = Field_Kind.TYPE_UNKNOWN;
/**
* The field cardinality.
*
* @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
*/
cardinality = Field_Cardinality.UNKNOWN;
/**
* The field number.
*
* @generated from field: int32 number = 3;
*/
number = 0;
/**
* The field name.
*
* @generated from field: string name = 4;
*/
name = "";
/**
* The field type URL, without the scheme, for message or enumeration
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
*
* @generated from field: string type_url = 6;
*/
typeUrl = "";
/**
* The index of the field type in `Type.oneofs`, for message or enumeration
* types. The first type has index 1; zero means the type is not in the list.
*
* @generated from field: int32 oneof_index = 7;
*/
oneofIndex = 0;
/**
* Whether to use alternative packed wire representation.
*
* @generated from field: bool packed = 8;
*/
packed = false;
/**
* The protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 9;
*/
options: Option[] = [];
/**
* The field JSON name.
*
* @generated from field: string json_name = 10;
*/
jsonName = "";
/**
* The string value of the default value of this field. Proto2 syntax only.
*
* @generated from field: string default_value = 11;
*/
defaultValue = "";
constructor(data?: PartialMessage<Field>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Field";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "kind", kind: "enum", T: proto3.getEnumType(Field_Kind) },
{ no: 2, name: "cardinality", kind: "enum", T: proto3.getEnumType(Field_Cardinality) },
{ no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "oneof_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 8, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 9, name: "options", kind: "message", T: Option, repeated: true },
{ no: 10, name: "json_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "default_value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Field {
return new Field().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Field {
return new Field().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Field {
return new Field().fromJsonString(jsonString, options);
}
static equals(a: Field | PlainMessage<Field> | undefined, b: Field | PlainMessage<Field> | undefined): boolean {
return proto3.util.equals(Field, a, b);
}
}
/**
* Basic field types.
*
* @generated from enum google.protobuf.Field.Kind
*/
export enum Field_Kind {
/**
* Field type unknown.
*
* @generated from enum value: TYPE_UNKNOWN = 0;
*/
TYPE_UNKNOWN = 0,
/**
* Field type double.
*
* @generated from enum value: TYPE_DOUBLE = 1;
*/
TYPE_DOUBLE = 1,
/**
* Field type float.
*
* @generated from enum value: TYPE_FLOAT = 2;
*/
TYPE_FLOAT = 2,
/**
* Field type int64.
*
* @generated from enum value: TYPE_INT64 = 3;
*/
TYPE_INT64 = 3,
/**
* Field type uint64.
*
* @generated from enum value: TYPE_UINT64 = 4;
*/
TYPE_UINT64 = 4,
/**
* Field type int32.
*
* @generated from enum value: TYPE_INT32 = 5;
*/
TYPE_INT32 = 5,
/**
* Field type fixed64.
*
* @generated from enum value: TYPE_FIXED64 = 6;
*/
TYPE_FIXED64 = 6,
/**
* Field type fixed32.
*
* @generated from enum value: TYPE_FIXED32 = 7;
*/
TYPE_FIXED32 = 7,
/**
* Field type bool.
*
* @generated from enum value: TYPE_BOOL = 8;
*/
TYPE_BOOL = 8,
/**
* Field type string.
*
* @generated from enum value: TYPE_STRING = 9;
*/
TYPE_STRING = 9,
/**
* Field type group. Proto2 syntax only, and deprecated.
*
* @generated from enum value: TYPE_GROUP = 10;
*/
TYPE_GROUP = 10,
/**
* Field type message.
*
* @generated from enum value: TYPE_MESSAGE = 11;
*/
TYPE_MESSAGE = 11,
/**
* Field type bytes.
*
* @generated from enum value: TYPE_BYTES = 12;
*/
TYPE_BYTES = 12,
/**
* Field type uint32.
*
* @generated from enum value: TYPE_UINT32 = 13;
*/
TYPE_UINT32 = 13,
/**
* Field type enum.
*
* @generated from enum value: TYPE_ENUM = 14;
*/
TYPE_ENUM = 14,
/**
* Field type sfixed32.
*
* @generated from enum value: TYPE_SFIXED32 = 15;
*/
TYPE_SFIXED32 = 15,
/**
* Field type sfixed64.
*
* @generated from enum value: TYPE_SFIXED64 = 16;
*/
TYPE_SFIXED64 = 16,
/**
* Field type sint32.
*
* @generated from enum value: TYPE_SINT32 = 17;
*/
TYPE_SINT32 = 17,
/**
* Field type sint64.
*
* @generated from enum value: TYPE_SINT64 = 18;
*/
TYPE_SINT64 = 18,
}
// Retrieve enum metadata with: proto3.getEnumType(Field_Kind)
proto3.util.setEnumType(Field_Kind, "google.protobuf.Field.Kind", [
{ no: 0, name: "TYPE_UNKNOWN" },
{ no: 1, name: "TYPE_DOUBLE" },
{ no: 2, name: "TYPE_FLOAT" },
{ no: 3, name: "TYPE_INT64" },
{ no: 4, name: "TYPE_UINT64" },
{ no: 5, name: "TYPE_INT32" },
{ no: 6, name: "TYPE_FIXED64" },
{ no: 7, name: "TYPE_FIXED32" },
{ no: 8, name: "TYPE_BOOL" },
{ no: 9, name: "TYPE_STRING" },
{ no: 10, name: "TYPE_GROUP" },
{ no: 11, name: "TYPE_MESSAGE" },
{ no: 12, name: "TYPE_BYTES" },
{ no: 13, name: "TYPE_UINT32" },
{ no: 14, name: "TYPE_ENUM" },
{ no: 15, name: "TYPE_SFIXED32" },
{ no: 16, name: "TYPE_SFIXED64" },
{ no: 17, name: "TYPE_SINT32" },
{ no: 18, name: "TYPE_SINT64" },
]);
/**
* Whether a field is optional, required, or repeated.
*
* @generated from enum google.protobuf.Field.Cardinality
*/
export enum Field_Cardinality {
/**
* For fields with unknown cardinality.
*
* @generated from enum value: CARDINALITY_UNKNOWN = 0;
*/
UNKNOWN = 0,
/**
* For optional fields.
*
* @generated from enum value: CARDINALITY_OPTIONAL = 1;
*/
OPTIONAL = 1,
/**
* For required fields. Proto2 syntax only.
*
* @generated from enum value: CARDINALITY_REQUIRED = 2;
*/
REQUIRED = 2,
/**
* For repeated fields.
*
* @generated from enum value: CARDINALITY_REPEATED = 3;
*/
REPEATED = 3,
}
// Retrieve enum metadata with: proto3.getEnumType(Field_Cardinality)
proto3.util.setEnumType(Field_Cardinality, "google.protobuf.Field.Cardinality", [
{ no: 0, name: "CARDINALITY_UNKNOWN" },
{ no: 1, name: "CARDINALITY_OPTIONAL" },
{ no: 2, name: "CARDINALITY_REQUIRED" },
{ no: 3, name: "CARDINALITY_REPEATED" },
]);
/**
* Enum type definition.
*
* @generated from message google.protobuf.Enum
*/
export class Enum extends Message<Enum> {
/**
* Enum type name.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* Enum value definitions.
*
* @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
*/
enumvalue: EnumValue[] = [];
/**
* Protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 3;
*/
options: Option[] = [];
/**
* The source context.
*
* @generated from field: google.protobuf.SourceContext source_context = 4;
*/
sourceContext?: SourceContext;
/**
* The source syntax.
*
* @generated from field: google.protobuf.Syntax syntax = 5;
*/
syntax = Syntax.PROTO2;
constructor(data?: PartialMessage<Enum>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Enum";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "enumvalue", kind: "message", T: EnumValue, repeated: true },
{ no: 3, name: "options", kind: "message", T: Option, repeated: true },
{ no: 4, name: "source_context", kind: "message", T: SourceContext },
{ no: 5, name: "syntax", kind: "enum", T: proto3.getEnumType(Syntax) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Enum {
return new Enum().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Enum {
return new Enum().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Enum {
return new Enum().fromJsonString(jsonString, options);
}
static equals(a: Enum | PlainMessage<Enum> | undefined, b: Enum | PlainMessage<Enum> | undefined): boolean {
return proto3.util.equals(Enum, a, b);
}
}
/**
* Enum value definition.
*
* @generated from message google.protobuf.EnumValue
*/
export class EnumValue extends Message<EnumValue> {
/**
* Enum value name.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* Enum value number.
*
* @generated from field: int32 number = 2;
*/
number = 0;
/**
* Protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 3;
*/
options: Option[] = [];
constructor(data?: PartialMessage<EnumValue>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.EnumValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 3, name: "options", kind: "message", T: Option, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnumValue {
return new EnumValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnumValue {
return new EnumValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnumValue {
return new EnumValue().fromJsonString(jsonString, options);
}
static equals(a: EnumValue | PlainMessage<EnumValue> | undefined, b: EnumValue | PlainMessage<EnumValue> | undefined): boolean {
return proto3.util.equals(EnumValue, a, b);
}
}
/**
* A protocol buffer option, which can be attached to a message, field,
* enumeration, etc.
*
* @generated from message google.protobuf.Option
*/
export class Option extends Message<Option> {
/**
* The option's name. For protobuf built-in options (options defined in
* descriptor.proto), this is the short name. For example, `"map_entry"`.
* For custom options, it should be the fully-qualified name. For example,
* `"google.api.http"`.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* The option's value packed in an Any message. If the value is a primitive,
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
* should be used. If the value is an enum, it should be stored as an int32
* value using the google.protobuf.Int32Value type.
*
* @generated from field: google.protobuf.Any value = 2;
*/
value?: Any;
constructor(data?: PartialMessage<Option>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Option";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "value", kind: "message", T: Any },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Option {
return new Option().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Option {
return new Option().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Option {
return new Option().fromJsonString(jsonString, options);
}
static equals(a: Option | PlainMessage<Option> | undefined, b: Option | PlainMessage<Option> | undefined): boolean {
return proto3.util.equals(Option, a, b);
}
}

View File

@@ -1,669 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Wrappers for primitive (non-message) types. These types are useful
// for embedding primitives in the `google.protobuf.Any` type and for places
// where we need to distinguish between the absence of a primitive
// typed field and its default value.
//
// These wrappers have no meaningful use within repeated fields as they lack
// the ability to detect presence on individual elements.
// These wrappers have no meaningful use within a map or a oneof since
// individual entries of a map or fields of a oneof can already detect presence.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/wrappers.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64, ScalarType } from "@bufbuild/protobuf";
/**
* Wrapper message for `double`.
*
* The JSON representation for `DoubleValue` is JSON number.
*
* @generated from message google.protobuf.DoubleValue
*/
export class DoubleValue extends Message<DoubleValue> {
/**
* The double value.
*
* @generated from field: double value = 1;
*/
value = 0;
constructor(data?: PartialMessage<DoubleValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.DOUBLE, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.DOUBLE, json);
} catch (e) {
let m = `cannot decode message google.protobuf.DoubleValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.DoubleValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
]);
static readonly fieldWrapper = {
wrapField(value: number): DoubleValue {
return new DoubleValue({value});
},
unwrapField(value: DoubleValue): number {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DoubleValue {
return new DoubleValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DoubleValue {
return new DoubleValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DoubleValue {
return new DoubleValue().fromJsonString(jsonString, options);
}
static equals(a: DoubleValue | PlainMessage<DoubleValue> | undefined, b: DoubleValue | PlainMessage<DoubleValue> | undefined): boolean {
return proto3.util.equals(DoubleValue, a, b);
}
}
/**
* Wrapper message for `float`.
*
* The JSON representation for `FloatValue` is JSON number.
*
* @generated from message google.protobuf.FloatValue
*/
export class FloatValue extends Message<FloatValue> {
/**
* The float value.
*
* @generated from field: float value = 1;
*/
value = 0;
constructor(data?: PartialMessage<FloatValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.FLOAT, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.FLOAT, json);
} catch (e) {
let m = `cannot decode message google.protobuf.FloatValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.FloatValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
]);
static readonly fieldWrapper = {
wrapField(value: number): FloatValue {
return new FloatValue({value});
},
unwrapField(value: FloatValue): number {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FloatValue {
return new FloatValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FloatValue {
return new FloatValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FloatValue {
return new FloatValue().fromJsonString(jsonString, options);
}
static equals(a: FloatValue | PlainMessage<FloatValue> | undefined, b: FloatValue | PlainMessage<FloatValue> | undefined): boolean {
return proto3.util.equals(FloatValue, a, b);
}
}
/**
* Wrapper message for `int64`.
*
* The JSON representation for `Int64Value` is JSON string.
*
* @generated from message google.protobuf.Int64Value
*/
export class Int64Value extends Message<Int64Value> {
/**
* The int64 value.
*
* @generated from field: int64 value = 1;
*/
value = protoInt64.zero;
constructor(data?: PartialMessage<Int64Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.INT64, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.INT64, json);
} catch (e) {
let m = `cannot decode message google.protobuf.Int64Value from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Int64Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
]);
static readonly fieldWrapper = {
wrapField(value: bigint): Int64Value {
return new Int64Value({value});
},
unwrapField(value: Int64Value): bigint {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Int64Value {
return new Int64Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Int64Value {
return new Int64Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Int64Value {
return new Int64Value().fromJsonString(jsonString, options);
}
static equals(a: Int64Value | PlainMessage<Int64Value> | undefined, b: Int64Value | PlainMessage<Int64Value> | undefined): boolean {
return proto3.util.equals(Int64Value, a, b);
}
}
/**
* Wrapper message for `uint64`.
*
* The JSON representation for `UInt64Value` is JSON string.
*
* @generated from message google.protobuf.UInt64Value
*/
export class UInt64Value extends Message<UInt64Value> {
/**
* The uint64 value.
*
* @generated from field: uint64 value = 1;
*/
value = protoInt64.zero;
constructor(data?: PartialMessage<UInt64Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.UINT64, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.UINT64, json);
} catch (e) {
let m = `cannot decode message google.protobuf.UInt64Value from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.UInt64Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
]);
static readonly fieldWrapper = {
wrapField(value: bigint): UInt64Value {
return new UInt64Value({value});
},
unwrapField(value: UInt64Value): bigint {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UInt64Value {
return new UInt64Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UInt64Value {
return new UInt64Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UInt64Value {
return new UInt64Value().fromJsonString(jsonString, options);
}
static equals(a: UInt64Value | PlainMessage<UInt64Value> | undefined, b: UInt64Value | PlainMessage<UInt64Value> | undefined): boolean {
return proto3.util.equals(UInt64Value, a, b);
}
}
/**
* Wrapper message for `int32`.
*
* The JSON representation for `Int32Value` is JSON number.
*
* @generated from message google.protobuf.Int32Value
*/
export class Int32Value extends Message<Int32Value> {
/**
* The int32 value.
*
* @generated from field: int32 value = 1;
*/
value = 0;
constructor(data?: PartialMessage<Int32Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.INT32, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.INT32, json);
} catch (e) {
let m = `cannot decode message google.protobuf.Int32Value from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Int32Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
static readonly fieldWrapper = {
wrapField(value: number): Int32Value {
return new Int32Value({value});
},
unwrapField(value: Int32Value): number {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Int32Value {
return new Int32Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Int32Value {
return new Int32Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Int32Value {
return new Int32Value().fromJsonString(jsonString, options);
}
static equals(a: Int32Value | PlainMessage<Int32Value> | undefined, b: Int32Value | PlainMessage<Int32Value> | undefined): boolean {
return proto3.util.equals(Int32Value, a, b);
}
}
/**
* Wrapper message for `uint32`.
*
* The JSON representation for `UInt32Value` is JSON number.
*
* @generated from message google.protobuf.UInt32Value
*/
export class UInt32Value extends Message<UInt32Value> {
/**
* The uint32 value.
*
* @generated from field: uint32 value = 1;
*/
value = 0;
constructor(data?: PartialMessage<UInt32Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.UINT32, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.UINT32, json);
} catch (e) {
let m = `cannot decode message google.protobuf.UInt32Value from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.UInt32Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
]);
static readonly fieldWrapper = {
wrapField(value: number): UInt32Value {
return new UInt32Value({value});
},
unwrapField(value: UInt32Value): number {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UInt32Value {
return new UInt32Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UInt32Value {
return new UInt32Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UInt32Value {
return new UInt32Value().fromJsonString(jsonString, options);
}
static equals(a: UInt32Value | PlainMessage<UInt32Value> | undefined, b: UInt32Value | PlainMessage<UInt32Value> | undefined): boolean {
return proto3.util.equals(UInt32Value, a, b);
}
}
/**
* Wrapper message for `bool`.
*
* The JSON representation for `BoolValue` is JSON `true` and `false`.
*
* @generated from message google.protobuf.BoolValue
*/
export class BoolValue extends Message<BoolValue> {
/**
* The bool value.
*
* @generated from field: bool value = 1;
*/
value = false;
constructor(data?: PartialMessage<BoolValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.BOOL, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.BOOL, json);
} catch (e) {
let m = `cannot decode message google.protobuf.BoolValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.BoolValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static readonly fieldWrapper = {
wrapField(value: boolean): BoolValue {
return new BoolValue({value});
},
unwrapField(value: BoolValue): boolean {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BoolValue {
return new BoolValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BoolValue {
return new BoolValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BoolValue {
return new BoolValue().fromJsonString(jsonString, options);
}
static equals(a: BoolValue | PlainMessage<BoolValue> | undefined, b: BoolValue | PlainMessage<BoolValue> | undefined): boolean {
return proto3.util.equals(BoolValue, a, b);
}
}
/**
* Wrapper message for `string`.
*
* The JSON representation for `StringValue` is JSON string.
*
* @generated from message google.protobuf.StringValue
*/
export class StringValue extends Message<StringValue> {
/**
* The string value.
*
* @generated from field: string value = 1;
*/
value = "";
constructor(data?: PartialMessage<StringValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.STRING, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.STRING, json);
} catch (e) {
let m = `cannot decode message google.protobuf.StringValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.StringValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static readonly fieldWrapper = {
wrapField(value: string): StringValue {
return new StringValue({value});
},
unwrapField(value: StringValue): string {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StringValue {
return new StringValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StringValue {
return new StringValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StringValue {
return new StringValue().fromJsonString(jsonString, options);
}
static equals(a: StringValue | PlainMessage<StringValue> | undefined, b: StringValue | PlainMessage<StringValue> | undefined): boolean {
return proto3.util.equals(StringValue, a, b);
}
}
/**
* Wrapper message for `bytes`.
*
* The JSON representation for `BytesValue` is JSON string.
*
* @generated from message google.protobuf.BytesValue
*/
export class BytesValue extends Message<BytesValue> {
/**
* The bytes value.
*
* @generated from field: bytes value = 1;
*/
value = new Uint8Array(0);
constructor(data?: PartialMessage<BytesValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.BYTES, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.BYTES, json);
} catch (e) {
let m = `cannot decode message google.protobuf.BytesValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.BytesValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
static readonly fieldWrapper = {
wrapField(value: Uint8Array): BytesValue {
return new BytesValue({value});
},
unwrapField(value: BytesValue): Uint8Array {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BytesValue {
return new BytesValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BytesValue {
return new BytesValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BytesValue {
return new BytesValue().fromJsonString(jsonString, options);
}
static equals(a: BytesValue | PlainMessage<BytesValue> | undefined, b: BytesValue | PlainMessage<BytesValue> | undefined): boolean {
return proto3.util.equals(BytesValue, a, b);
}
}

View File

@@ -1,275 +0,0 @@
// 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" },
]);

View File

@@ -1,707 +0,0 @@
// 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);
}
}

View File

@@ -1,134 +0,0 @@
// 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);
}
}