Latest generation

This commit is contained in:
ci core model
2026-01-16 10:20:08 +00:00
parent 1381e013ae
commit f88953d031
15 changed files with 2349 additions and 178 deletions

View File

@@ -2,7 +2,7 @@
// @generated from protobuf file "google/api/field_behavior.proto" (package "google.api", syntax proto3)
// tslint:disable
//
// Copyright 2020 Google LLC
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -73,5 +73,40 @@ export enum FieldBehavior {
*
* @generated from protobuf enum value: IMMUTABLE = 5;
*/
IMMUTABLE = 5
IMMUTABLE = 5,
/**
* Denotes that a (repeated) field is an unordered list.
* This indicates that the service may provide the elements of the list
* in any arbitrary order, rather than the order the user originally
* provided. Additionally, the list's order may or may not be stable.
*
* @generated from protobuf enum value: UNORDERED_LIST = 6;
*/
UNORDERED_LIST = 6,
/**
* Denotes that this field returns a non-empty default value if not set.
* This indicates that if the user provides the empty value in a request,
* a non-empty value will be returned. The user will not be aware of what
* non-empty value to expect.
*
* @generated from protobuf enum value: NON_EMPTY_DEFAULT = 7;
*/
NON_EMPTY_DEFAULT = 7,
/**
* Denotes that the field in a resource (a message annotated with
* google.api.resource) is used in the resource name to uniquely identify the
* resource. For AIP-compliant APIs, this should only be applied to the
* `name` field on the resource.
*
* This behavior should not be applied to references to other resources within
* the message.
*
* The identifier field of resources often have different field behavior
* depending on the request it is embedded in (e.g. for Create methods name
* is optional and unused, while for Update methods it is required). Instead
* of method-specific annotations, only `IDENTIFIER` is required.
*
* @generated from protobuf enum value: IDENTIFIER = 8;
*/
IDENTIFIER = 8
}

View File

@@ -2,7 +2,7 @@
// @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3)
// tslint:disable
//
// Copyright 2020 Google LLC
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@ export interface Http {
fully_decode_reserved_expansion: boolean;
}
/**
* # gRPC Transcoding
* 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
@@ -95,9 +95,8 @@ export interface Http {
*
* This enables an HTTP REST to gRPC mapping as below:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
* - HTTP: `GET /v1/messages/123456`
* - gRPC: `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.
@@ -121,11 +120,9 @@ export interface Http {
*
* 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"))`
* - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
* - gRPC: `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.
@@ -155,10 +152,8 @@ export interface Http {
* 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!" })`
* - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
* - gRPC: `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
@@ -181,10 +176,8 @@ export interface Http {
*
* The following HTTP JSON to RPC mapping is enabled:
*
* HTTP | gRPC
* -----|-----
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" text: "Hi!")`
* - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
* - gRPC: `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
@@ -212,29 +205,32 @@ export interface Http {
*
* 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")`
* - HTTP: `GET /v1/messages/123456`
* - gRPC: `GetMessage(message_id: "123456")`
*
* ## Rules for HTTP mapping
* - HTTP: `GET /v1/users/me/messages/123456`
* - gRPC: `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
* - 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
* 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
* 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
* Path template syntax
*
* Template = "/" Segments [ Verb ] ;
* Segments = Segment { "/" Segment } ;
@@ -273,7 +269,7 @@ export interface Http {
* Document](https://developers.google.com/discovery/v1/reference/apis) as
* `{+var}`.
*
* ## Using gRPC API Service Configuration
* 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
@@ -288,15 +284,14 @@ export interface Http {
* specified in the service config will override any matching transcoding
* configuration in the proto.
*
* Example:
* The following example selects a gRPC method and applies an `HttpRule` to it:
*
* 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
* Special notes
*
* When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
* proto to JSON conversion must follow the [proto3
@@ -330,7 +325,8 @@ export interface HttpRule {
/**
* Selects a method to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
*
* @generated from protobuf field: string selector = 1
*/

View File

@@ -2,7 +2,7 @@
// @generated from protobuf file "google/api/httpbody.proto" (package "google.api", syntax proto3)
// tslint:disable
//
// Copyright 2020 Google LLC
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -47,12 +47,15 @@ import { Any } from "../protobuf/any";
*
* // 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);
* rpc GetResource(GetResourceRequest)
* returns (google.api.HttpBody);
* rpc UpdateResource(google.api.HttpBody)
* returns (google.protobuf.Empty);
*
* }
*
* Example with streaming methods:
@@ -62,6 +65,7 @@ import { Any } from "../protobuf/any";
* 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

View File

@@ -73,6 +73,10 @@ import { MessageType } from "@protobuf-ts/runtime";
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
* // or ...
* if (any.isSameTypeAs(Foo.getDefaultInstance())) {
* foo = any.unpack(Foo.getDefaultInstance());
* }
*
* Example 3: Pack and unpack a message in Python.
*
@@ -87,10 +91,13 @@ import { MessageType } from "@protobuf-ts/runtime";
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := ptypes.MarshalAny(foo)
* any, err := anypb.New(foo)
* if err != nil {
* ...
* }
* ...
* foo := &pb.Foo{}
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
* if err := any.UnmarshalTo(foo); err != nil {
* ...
* }
*
@@ -100,7 +107,6 @@ import { MessageType } from "@protobuf-ts/runtime";
* 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
@@ -157,7 +163,8 @@ export interface Any {
*
* 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.
* type.googleapis.com. As of May 2023, there are no widely used type server
* implementations and no plans to implement one.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.

View File

@@ -55,6 +55,11 @@ import { Option } from "./type";
* this message itself. See https://cloud.google.com/apis/design/glossary for
* detailed terminology.
*
* New usages of this message as an alternative to ServiceDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from protobuf message google.protobuf.Api
*/
export interface Api {
@@ -99,7 +104,6 @@ export interface Api {
* experimental, non-GA interfaces.
*
*
*
* @generated from protobuf field: string version = 4
*/
version: string;
@@ -122,10 +126,21 @@ export interface Api {
* @generated from protobuf field: google.protobuf.Syntax syntax = 7
*/
syntax: Syntax;
/**
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
*
* @generated from protobuf field: string edition = 8
*/
edition: string;
}
/**
* Method represents a method of an API interface.
*
* New usages of this message as an alternative to MethodDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from protobuf message google.protobuf.Method
*/
export interface Method {
@@ -168,9 +183,23 @@ export interface Method {
/**
* The source syntax of this method.
*
* @generated from protobuf field: google.protobuf.Syntax syntax = 7
* This field should be ignored, instead the syntax should be inherited from
* Api. This is similar to Field and EnumValue.
*
* @deprecated
* @generated from protobuf field: google.protobuf.Syntax syntax = 7 [deprecated = true]
*/
syntax: Syntax;
/**
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
*
* This field should be ignored, instead the edition should be inherited from
* Api. This is similar to Field and EnumValue.
*
* @deprecated
* @generated from protobuf field: string edition = 8 [deprecated = true]
*/
edition: string;
}
/**
* Declares an API Interface to be included in this interface. The including
@@ -220,7 +249,7 @@ export interface Method {
* 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
* see the effective `Storage.GetAcl` method after inheriting
* documentation and annotations as follows:
*
* service Storage {
@@ -279,7 +308,8 @@ class Api$Type extends MessageType<Api> {
{ no: 4, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "source_context", kind: "message", localName: "source_context", T: () => SourceContext },
{ no: 6, name: "mixins", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Mixin },
{ no: 7, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax] }
{ no: 7, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax] },
{ no: 8, name: "edition", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<Api>): Api {
@@ -290,6 +320,7 @@ class Api$Type extends MessageType<Api> {
message.version = "";
message.mixins = [];
message.syntax = 0;
message.edition = "";
if (value !== undefined)
reflectionMergePartial<Api>(this, message, value);
return message;
@@ -320,6 +351,9 @@ class Api$Type extends MessageType<Api> {
case /* google.protobuf.Syntax syntax */ 7:
message.syntax = reader.int32();
break;
case /* string edition */ 8:
message.edition = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -353,6 +387,9 @@ class Api$Type extends MessageType<Api> {
/* google.protobuf.Syntax syntax = 7; */
if (message.syntax !== 0)
writer.tag(7, WireType.Varint).int32(message.syntax);
/* string edition = 8; */
if (message.edition !== "")
writer.tag(8, WireType.LengthDelimited).string(message.edition);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -373,7 +410,8 @@ class Method$Type extends MessageType<Method> {
{ no: 4, name: "response_type_url", kind: "scalar", localName: "response_type_url", T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "response_streaming", kind: "scalar", localName: "response_streaming", T: 8 /*ScalarType.BOOL*/ },
{ no: 6, name: "options", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Option },
{ no: 7, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax] }
{ no: 7, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax] },
{ no: 8, name: "edition", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<Method>): Method {
@@ -385,6 +423,7 @@ class Method$Type extends MessageType<Method> {
message.response_streaming = false;
message.options = [];
message.syntax = 0;
message.edition = "";
if (value !== undefined)
reflectionMergePartial<Method>(this, message, value);
return message;
@@ -412,9 +451,12 @@ class Method$Type extends MessageType<Method> {
case /* repeated google.protobuf.Option options */ 6:
message.options.push(Option.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* google.protobuf.Syntax syntax */ 7:
case /* google.protobuf.Syntax syntax = 7 [deprecated = true] */ 7:
message.syntax = reader.int32();
break;
case /* string edition = 8 [deprecated = true] */ 8:
message.edition = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -445,9 +487,12 @@ class Method$Type extends MessageType<Method> {
/* repeated google.protobuf.Option options = 6; */
for (let i = 0; i < message.options.length; i++)
Option.internalBinaryWrite(message.options[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Syntax syntax = 7; */
/* google.protobuf.Syntax syntax = 7 [deprecated = true]; */
if (message.syntax !== 0)
writer.tag(7, WireType.Varint).int32(message.syntax);
/* string edition = 8 [deprecated = true]; */
if (message.edition !== "")
writer.tag(8, WireType.LengthDelimited).string(message.edition);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);

View File

@@ -4,40 +4,14 @@
//
// 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.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
//
//
// 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.
@@ -58,6 +32,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { GeneratedCodeInfo } from "../descriptor";
import { FileDescriptorProto } from "../descriptor";
/**
* The version number of protocol compiler.
@@ -110,6 +85,11 @@ export interface CodeGeneratorRequest {
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
*
* Note: the files listed in files_to_generate will include runtime-retention
* options only, but all other files will include source-retention options.
* The source_file_descriptors field below is available in case you need
* source-retention options for files_to_generate.
*
* 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
@@ -124,6 +104,14 @@ export interface CodeGeneratorRequest {
* @generated from protobuf field: repeated google.protobuf.FileDescriptorProto proto_file = 15
*/
proto_file: FileDescriptorProto[];
/**
* File descriptors with all options, including source-retention options.
* These descriptors are only provided for the files listed in
* files_to_generate.
*
* @generated from protobuf field: repeated google.protobuf.FileDescriptorProto source_file_descriptors = 17
*/
source_file_descriptors: FileDescriptorProto[];
/**
* The version number of protocol compiler.
*
@@ -150,6 +138,31 @@ export interface CodeGeneratorResponse {
* @generated from protobuf field: optional string error = 1
*/
error?: string;
/**
* A bitmask of supported features that the code generator supports.
* This is a bitwise "or" of values from the Feature enum.
*
* @generated from protobuf field: optional uint64 supported_features = 2
*/
supported_features?: bigint;
/**
* The minimum edition this plugin supports. This will be treated as an
* Edition enum, but we want to allow unknown values. It should be specified
* according the edition enum value, *not* the edition number. Only takes
* effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
*
* @generated from protobuf field: optional int32 minimum_edition = 3
*/
minimum_edition?: number;
/**
* The maximum edition this plugin supports. This will be treated as an
* Edition enum, but we want to allow unknown values. It should be specified
* according the edition enum value, *not* the edition number. Only takes
* effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
*
* @generated from protobuf field: optional int32 maximum_edition = 4
*/
maximum_edition?: number;
/**
* @generated from protobuf field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15
*/
@@ -225,6 +238,33 @@ export interface CodeGeneratorResponse_File {
* @generated from protobuf field: optional string content = 15
*/
content?: string;
/**
* Information describing the file content being inserted. If an insertion
* point is used, this information will be appropriately offset and inserted
* into the code generation metadata for the generated files.
*
* @generated from protobuf field: optional google.protobuf.GeneratedCodeInfo generated_code_info = 16
*/
generated_code_info?: GeneratedCodeInfo;
}
/**
* Sync with code_generator.h.
*
* @generated from protobuf enum google.protobuf.compiler.CodeGeneratorResponse.Feature
*/
export enum CodeGeneratorResponse_Feature {
/**
* @generated from protobuf enum value: FEATURE_NONE = 0;
*/
FEATURE_NONE = 0,
/**
* @generated from protobuf enum value: FEATURE_PROTO3_OPTIONAL = 1;
*/
FEATURE_PROTO3_OPTIONAL = 1,
/**
* @generated from protobuf enum value: FEATURE_SUPPORTS_EDITIONS = 2;
*/
FEATURE_SUPPORTS_EDITIONS = 2
}
// @generated message type with reflection information, may provide speed optimized methods
class Version$Type extends MessageType<Version> {
@@ -300,6 +340,7 @@ class CodeGeneratorRequest$Type extends MessageType<CodeGeneratorRequest> {
{ no: 1, name: "file_to_generate", kind: "scalar", localName: "file_to_generate", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "parameter", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 15, name: "proto_file", kind: "message", localName: "proto_file", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FileDescriptorProto },
{ no: 17, name: "source_file_descriptors", kind: "message", localName: "source_file_descriptors", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FileDescriptorProto },
{ no: 3, name: "compiler_version", kind: "message", localName: "compiler_version", T: () => Version }
]);
}
@@ -307,6 +348,7 @@ class CodeGeneratorRequest$Type extends MessageType<CodeGeneratorRequest> {
const message = globalThis.Object.create((this.messagePrototype!));
message.file_to_generate = [];
message.proto_file = [];
message.source_file_descriptors = [];
if (value !== undefined)
reflectionMergePartial<CodeGeneratorRequest>(this, message, value);
return message;
@@ -325,6 +367,9 @@ class CodeGeneratorRequest$Type extends MessageType<CodeGeneratorRequest> {
case /* repeated google.protobuf.FileDescriptorProto proto_file */ 15:
message.proto_file.push(FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated google.protobuf.FileDescriptorProto source_file_descriptors */ 17:
message.source_file_descriptors.push(FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* optional google.protobuf.compiler.Version compiler_version */ 3:
message.compiler_version = Version.internalBinaryRead(reader, reader.uint32(), options, message.compiler_version);
break;
@@ -352,6 +397,9 @@ class CodeGeneratorRequest$Type extends MessageType<CodeGeneratorRequest> {
/* repeated google.protobuf.FileDescriptorProto proto_file = 15; */
for (let i = 0; i < message.proto_file.length; i++)
FileDescriptorProto.internalBinaryWrite(message.proto_file[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
/* repeated google.protobuf.FileDescriptorProto source_file_descriptors = 17; */
for (let i = 0; i < message.source_file_descriptors.length; i++)
FileDescriptorProto.internalBinaryWrite(message.source_file_descriptors[i], writer.tag(17, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -367,6 +415,9 @@ class CodeGeneratorResponse$Type extends MessageType<CodeGeneratorResponse> {
constructor() {
super("google.protobuf.compiler.CodeGeneratorResponse", [
{ no: 1, name: "error", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "supported_features", kind: "scalar", localName: "supported_features", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 3, name: "minimum_edition", kind: "scalar", localName: "minimum_edition", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 4, name: "maximum_edition", kind: "scalar", localName: "maximum_edition", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 15, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CodeGeneratorResponse_File }
]);
}
@@ -385,6 +436,15 @@ class CodeGeneratorResponse$Type extends MessageType<CodeGeneratorResponse> {
case /* optional string error */ 1:
message.error = reader.string();
break;
case /* optional uint64 supported_features */ 2:
message.supported_features = reader.uint64().toBigInt();
break;
case /* optional int32 minimum_edition */ 3:
message.minimum_edition = reader.int32();
break;
case /* optional int32 maximum_edition */ 4:
message.maximum_edition = reader.int32();
break;
case /* repeated google.protobuf.compiler.CodeGeneratorResponse.File file */ 15:
message.file.push(CodeGeneratorResponse_File.internalBinaryRead(reader, reader.uint32(), options));
break;
@@ -403,6 +463,15 @@ class CodeGeneratorResponse$Type extends MessageType<CodeGeneratorResponse> {
/* optional string error = 1; */
if (message.error !== undefined)
writer.tag(1, WireType.LengthDelimited).string(message.error);
/* optional uint64 supported_features = 2; */
if (message.supported_features !== undefined)
writer.tag(2, WireType.Varint).uint64(message.supported_features);
/* optional int32 minimum_edition = 3; */
if (message.minimum_edition !== undefined)
writer.tag(3, WireType.Varint).int32(message.minimum_edition);
/* optional int32 maximum_edition = 4; */
if (message.maximum_edition !== undefined)
writer.tag(4, WireType.Varint).int32(message.maximum_edition);
/* repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15; */
for (let i = 0; i < message.file.length; i++)
CodeGeneratorResponse_File.internalBinaryWrite(message.file[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
@@ -422,7 +491,8 @@ class CodeGeneratorResponse_File$Type extends MessageType<CodeGeneratorResponse_
super("google.protobuf.compiler.CodeGeneratorResponse.File", [
{ no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "insertion_point", kind: "scalar", localName: "insertion_point", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 15, name: "content", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
{ no: 15, name: "content", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 16, name: "generated_code_info", kind: "message", localName: "generated_code_info", T: () => GeneratedCodeInfo }
]);
}
create(value?: PartialMessage<CodeGeneratorResponse_File>): CodeGeneratorResponse_File {
@@ -445,6 +515,9 @@ class CodeGeneratorResponse_File$Type extends MessageType<CodeGeneratorResponse_
case /* optional string content */ 15:
message.content = reader.string();
break;
case /* optional google.protobuf.GeneratedCodeInfo generated_code_info */ 16:
message.generated_code_info = GeneratedCodeInfo.internalBinaryRead(reader, reader.uint32(), options, message.generated_code_info);
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -466,6 +539,9 @@ class CodeGeneratorResponse_File$Type extends MessageType<CodeGeneratorResponse_
/* optional string content = 15; */
if (message.content !== undefined)
writer.tag(15, WireType.LengthDelimited).string(message.content);
/* optional google.protobuf.GeneratedCodeInfo generated_code_info = 16; */
if (message.generated_code_info)
GeneratedCodeInfo.internalBinaryWrite(message.generated_code_info, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);

File diff suppressed because it is too large Load Diff

View File

@@ -107,7 +107,6 @@ import { MessageType } from "@protobuf-ts/runtime";
* microsecond should be expressed in JSON format as "3.000001s".
*
*
*
* @generated from protobuf message google.protobuf.Duration
*/
export interface Duration {

View File

@@ -49,7 +49,6 @@ import { MessageType } from "@protobuf-ts/runtime";
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
*
* The JSON representation for `Empty` is empty JSON object `{}`.
*
* @generated from protobuf message google.protobuf.Empty
*/

View File

@@ -72,8 +72,8 @@ export interface Struct {
/**
* `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.
* list of values. A producer of value is expected to set one of these
* variants. Absence of any variant indicates an error.
*
* The JSON representation for `Value` is JSON value.
*
@@ -156,7 +156,7 @@ export interface ListValue {
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
*
* The JSON representation for `NullValue` is JSON `null`.
* The JSON representation for `NullValue` is JSON `null`.
*
* @generated from protobuf enum google.protobuf.NullValue
*/

View File

@@ -97,8 +97,15 @@ import { MessageType } from "@protobuf-ts/runtime";
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
* .setNanos((int) ((millis % 1000) * 1000000)).build();
*
* Example 5: Compute Timestamp from Java `Instant.now()`.
*
* Example 5: Compute Timestamp from current time in Python.
* Instant now = Instant.now();
*
* Timestamp timestamp =
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
* .setNanos(now.getNano()).build();
*
* Example 6: Compute Timestamp from current time in Python.
*
* timestamp = Timestamp()
* timestamp.GetCurrentTime()
@@ -112,8 +119,8 @@ import { MessageType } from "@protobuf-ts/runtime";
* {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
* is required. A ProtoJSON serializer should always use UTC (as indicated by
* "Z") when printing the Timestamp type and a ProtoJSON 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
@@ -127,26 +134,26 @@ import { MessageType } from "@protobuf-ts/runtime";
* [`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
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
* ) to obtain a formatter capable of generating timestamps in this format.
*
*
*
* @generated from protobuf message google.protobuf.Timestamp
*/
export interface 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.
* Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
* be between -62135596800 and 253402300799 inclusive (which corresponds to
* 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
*
* @generated from protobuf field: int64 seconds = 1
*/
seconds: bigint;
/**
* 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
* Non-negative fractions of a second at nanosecond resolution. This field is
* the nanosecond portion of the duration, not an alternative to seconds.
* Negative second values with fractions must still have non-negative nanos
* values that count forward in time. Must be between 0 and 999,999,999
* inclusive.
*
* @generated from protobuf field: int32 nanos = 2

View File

@@ -46,6 +46,11 @@ import { SourceContext } from "./source_context";
/**
* A protocol buffer message type.
*
* New usages of this message as an alternative to DescriptorProto are strongly
* discouraged. This message does not reliability preserve all information
* necessary to model the schema and preserve semantics. Instead make use of
* FileDescriptorSet which preserves the necessary information.
*
* @generated from protobuf message google.protobuf.Type
*/
export interface Type {
@@ -85,10 +90,21 @@ export interface Type {
* @generated from protobuf field: google.protobuf.Syntax syntax = 6
*/
syntax: Syntax;
/**
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
*
* @generated from protobuf field: string edition = 7
*/
edition: string;
}
/**
* A single field of a message type.
*
* New usages of this message as an alternative to FieldDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from protobuf message google.protobuf.Field
*/
export interface Field {
@@ -310,6 +326,11 @@ export enum Field_Cardinality {
/**
* Enum type definition.
*
* New usages of this message as an alternative to EnumDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from protobuf message google.protobuf.Enum
*/
export interface Enum {
@@ -343,10 +364,21 @@ export interface Enum {
* @generated from protobuf field: google.protobuf.Syntax syntax = 5
*/
syntax: Syntax;
/**
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
*
* @generated from protobuf field: string edition = 6
*/
edition: string;
}
/**
* Enum value definition.
*
* New usages of this message as an alternative to EnumValueDescriptorProto are
* strongly discouraged. This message does not reliability preserve all
* information necessary to model the schema and preserve semantics. Instead
* make use of FileDescriptorSet which preserves the necessary information.
*
* @generated from protobuf message google.protobuf.EnumValue
*/
export interface EnumValue {
@@ -373,6 +405,10 @@ export interface EnumValue {
* A protocol buffer option, which can be attached to a message, field,
* enumeration, etc.
*
* New usages of this message as an alternative to FileOptions, MessageOptions,
* FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
* are strongly discouraged.
*
* @generated from protobuf message google.protobuf.Option
*/
export interface Option {
@@ -412,7 +448,13 @@ export enum Syntax {
*
* @generated from protobuf enum value: SYNTAX_PROTO3 = 1;
*/
SYNTAX_PROTO3 = 1
SYNTAX_PROTO3 = 1,
/**
* Syntax `editions`.
*
* @generated from protobuf enum value: SYNTAX_EDITIONS = 2;
*/
SYNTAX_EDITIONS = 2
}
// @generated message type with reflection information, may provide speed optimized methods
class Type$Type extends MessageType<Type> {
@@ -423,7 +465,8 @@ class Type$Type extends MessageType<Type> {
{ no: 3, name: "oneofs", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "options", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Option },
{ no: 5, name: "source_context", kind: "message", localName: "source_context", T: () => SourceContext },
{ no: 6, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax] }
{ no: 6, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax] },
{ no: 7, name: "edition", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<Type>): Type {
@@ -433,6 +476,7 @@ class Type$Type extends MessageType<Type> {
message.oneofs = [];
message.options = [];
message.syntax = 0;
message.edition = "";
if (value !== undefined)
reflectionMergePartial<Type>(this, message, value);
return message;
@@ -460,6 +504,9 @@ class Type$Type extends MessageType<Type> {
case /* google.protobuf.Syntax syntax */ 6:
message.syntax = reader.int32();
break;
case /* string edition */ 7:
message.edition = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -490,6 +537,9 @@ class Type$Type extends MessageType<Type> {
/* google.protobuf.Syntax syntax = 6; */
if (message.syntax !== 0)
writer.tag(6, WireType.Varint).int32(message.syntax);
/* string edition = 7; */
if (message.edition !== "")
writer.tag(7, WireType.LengthDelimited).string(message.edition);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -627,7 +677,8 @@ class Enum$Type extends MessageType<Enum> {
{ no: 2, name: "enumvalue", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumValue },
{ no: 3, name: "options", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Option },
{ no: 4, name: "source_context", kind: "message", localName: "source_context", T: () => SourceContext },
{ no: 5, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax] }
{ no: 5, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax] },
{ no: 6, name: "edition", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<Enum>): Enum {
@@ -636,6 +687,7 @@ class Enum$Type extends MessageType<Enum> {
message.enumvalue = [];
message.options = [];
message.syntax = 0;
message.edition = "";
if (value !== undefined)
reflectionMergePartial<Enum>(this, message, value);
return message;
@@ -660,6 +712,9 @@ class Enum$Type extends MessageType<Enum> {
case /* google.protobuf.Syntax syntax */ 5:
message.syntax = reader.int32();
break;
case /* string edition */ 6:
message.edition = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
@@ -687,6 +742,9 @@ class Enum$Type extends MessageType<Enum> {
/* google.protobuf.Syntax syntax = 5; */
if (message.syntax !== 0)
writer.tag(5, WireType.Varint).int32(message.syntax);
/* string edition = 6; */
if (message.edition !== "")
writer.tag(6, WireType.LengthDelimited).string(message.edition);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);

View File

@@ -32,11 +32,17 @@
// (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 were needed
// for legacy reasons and are not recommended for use in new APIs.
//
// 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.
// Historically these wrappers were useful to have presence on proto3 primitive
// fields, but proto3 syntax has been updated to support the `optional` keyword.
// Using that keyword is now the strongly preferred way to add presence to
// proto3 primitive fields.
//
// A secondary usecase was to embed primitives in the `google.protobuf.Any`
// type: it is now recommended that you embed your value in your own wrapper
// message which can be specifically documented.
//
// These wrappers have no meaningful use within repeated fields as they lack
// the ability to detect presence on individual elements.
@@ -62,6 +68,9 @@ import { MessageType } from "@protobuf-ts/runtime";
*
* The JSON representation for `DoubleValue` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.DoubleValue
*/
export interface DoubleValue {
@@ -77,6 +86,9 @@ export interface DoubleValue {
*
* The JSON representation for `FloatValue` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.FloatValue
*/
export interface FloatValue {
@@ -92,6 +104,9 @@ export interface FloatValue {
*
* The JSON representation for `Int64Value` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.Int64Value
*/
export interface Int64Value {
@@ -107,6 +122,9 @@ export interface Int64Value {
*
* The JSON representation for `UInt64Value` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.UInt64Value
*/
export interface UInt64Value {
@@ -122,6 +140,9 @@ export interface UInt64Value {
*
* The JSON representation for `Int32Value` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.Int32Value
*/
export interface Int32Value {
@@ -137,6 +158,9 @@ export interface Int32Value {
*
* The JSON representation for `UInt32Value` is JSON number.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.UInt32Value
*/
export interface UInt32Value {
@@ -152,6 +176,9 @@ export interface UInt32Value {
*
* The JSON representation for `BoolValue` is JSON `true` and `false`.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.BoolValue
*/
export interface BoolValue {
@@ -167,6 +194,9 @@ export interface BoolValue {
*
* The JSON representation for `StringValue` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.StringValue
*/
export interface StringValue {
@@ -182,6 +212,9 @@ export interface StringValue {
*
* The JSON representation for `BytesValue` is JSON string.
*
* Not recommended for use in new APIs, but still useful for legacy APIs and
* has no plan to be removed.
*
* @generated from protobuf message google.protobuf.BytesValue
*/
export interface BytesValue {