diff --git a/src/protos/google/api/annotations.proto b/src/protos/google/api/annotations.proto index efdab3d..84c4816 100644 --- a/src/protos/google/api/annotations.proto +++ b/src/protos/google/api/annotations.proto @@ -1,4 +1,4 @@ -// Copyright 2015 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/protos/google/api/client.proto b/src/protos/google/api/client.proto index 39bdde8..2115758 100644 --- a/src/protos/google/api/client.proto +++ b/src/protos/google/api/client.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -98,6 +98,22 @@ extend google.protobuf.ServiceOptions { // ... // } string oauth_scopes = 1050; + + // The API version of this service, which should be sent by version-aware + // clients to the service. This allows services to abide by the schema and + // behavior of the service at the time this API version was deployed. + // The format of the API version must be treated as opaque by clients. + // Services may use a format with an apparent structure, but clients must + // not rely on this to determine components within an API version, or attempt + // to construct other valid API versions. Note that this is for upcoming + // functionality and may not be implemented for all services. + // + // Example: + // + // service Foo { + // option (google.api.api_version) = "v1_20230821_preview"; + // } + string api_version = 525000001; } // Required information for every language. @@ -192,6 +208,10 @@ message Publishing { // Optional link to proto reference documentation. Example: // https://cloud.google.com/pubsub/lite/docs/reference/rpc string proto_reference_documentation_uri = 110; + + // Optional link to REST reference documentation. Example: + // https://cloud.google.com/pubsub/lite/docs/reference/rest + string rest_reference_documentation_uri = 111; } // Settings for Java client libraries. @@ -243,8 +263,22 @@ message PhpSettings { // Settings for Python client libraries. message PythonSettings { + // Experimental features to be included during client library generation. + // These fields will be deprecated once the feature graduates and is enabled + // by default. + message ExperimentalFeatures { + // Enables generation of asynchronous REST clients if `rest` transport is + // enabled. By default, asynchronous REST clients will not be generated. + // This feature will be enabled by default 1 month after launching the + // feature in preview packages. + bool rest_async_io_enabled = 1; + } + // Some settings. CommonLanguageSettings common = 1; + + // Experimental features to be included during client library generation. + ExperimentalFeatures experimental_features = 2; } // Settings for Node client libraries. @@ -329,6 +363,13 @@ message MethodSettings { // The fully qualified name of the method, for which the options below apply. // This is used to find the method to apply the options. + // + // Example: + // + // publishing: + // method_settings: + // - selector: google.storage.control.v2.StorageControl.CreateFolder + // # method settings for CreateFolder... string selector = 1; // Describes settings to use for long-running operations when generating @@ -337,17 +378,14 @@ message MethodSettings { // // Example of a YAML configuration:: // - // publishing: - // method_settings: + // publishing: + // method_settings: // - selector: google.cloud.speech.v2.Speech.BatchRecognize // long_running: - // initial_poll_delay: - // seconds: 60 # 1 minute + // initial_poll_delay: 60s # 1 minute // poll_delay_multiplier: 1.5 - // max_poll_delay: - // seconds: 360 # 6 minutes - // total_poll_timeout: - // seconds: 54000 # 90 minutes + // max_poll_delay: 360s # 6 minutes + // total_poll_timeout: 54000s # 90 minutes LongRunning long_running = 2; // List of top-level fields of the request message, that should be @@ -356,8 +394,8 @@ message MethodSettings { // // Example of a YAML configuration: // - // publishing: - // method_settings: + // publishing: + // method_settings: // - selector: google.example.v1.ExampleService.CreateExample // auto_populated_fields: // - request_id diff --git a/src/protos/google/api/field_behavior.proto b/src/protos/google/api/field_behavior.proto index 344cb0b..2865ba0 100644 --- a/src/protos/google/api/field_behavior.proto +++ b/src/protos/google/api/field_behavior.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ extend google.protobuf.FieldOptions { // google.protobuf.Timestamp expire_time = 1 // [(google.api.field_behavior) = OUTPUT_ONLY, // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; + repeated google.api.FieldBehavior field_behavior = 1052 [packed = false]; } // An indicator of the behavior of a given field (for example, that a field diff --git a/src/protos/google/api/http.proto b/src/protos/google/api/http.proto index 31d867a..e327037 100644 --- a/src/protos/google/api/http.proto +++ b/src/protos/google/api/http.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ message Http { bool fully_decode_reserved_expansion = 2; } -// # 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 @@ -82,9 +82,8 @@ message 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. @@ -108,11 +107,9 @@ message 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. @@ -142,10 +139,8 @@ message 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 @@ -168,10 +163,8 @@ message 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 @@ -199,13 +192,13 @@ message 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: @@ -224,7 +217,7 @@ message 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 } ; @@ -263,7 +256,7 @@ message 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 @@ -278,15 +271,14 @@ message 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 diff --git a/src/protos/google/api/launch_stage.proto b/src/protos/google/api/launch_stage.proto index 9802de7..9863fc2 100644 --- a/src/protos/google/api/launch_stage.proto +++ b/src/protos/google/api/launch_stage.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/protos/google/api/resource.proto b/src/protos/google/api/resource.proto index bf0cbec..3762af8 100644 --- a/src/protos/google/api/resource.proto +++ b/src/protos/google/api/resource.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -179,8 +179,13 @@ message ResourceDescriptor { // The plural name used in the resource name and permission names, such as // 'projects' for the resource name of 'projects/{project}' and the permission - // name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same - // concept of the `plural` field in k8s CRD spec + // name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + // to this is for Nested Collections that have stuttering names, as defined + // in [AIP-122](https://google.aip.dev/122#nested-collections), where the + // collection ID in the resource name pattern does not necessarily directly + // match the `plural` value. + // + // It is the same concept of the `plural` field in k8s CRD spec // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ // // Note: The plural form is required even for singleton resources. See diff --git a/src/protos/google/cloud/bigquery/storage/v1/arrow.proto b/src/protos/google/cloud/bigquery/storage/v1/arrow.proto index 05036d2..530d417 100644 --- a/src/protos/google/cloud/bigquery/storage/v1/arrow.proto +++ b/src/protos/google/cloud/bigquery/storage/v1/arrow.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/protos/google/cloud/bigquery/storage/v1/avro.proto b/src/protos/google/cloud/bigquery/storage/v1/avro.proto index 588406a..b104a90 100644 --- a/src/protos/google/cloud/bigquery/storage/v1/avro.proto +++ b/src/protos/google/cloud/bigquery/storage/v1/avro.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/protos/google/cloud/bigquery/storage/v1/protobuf.proto b/src/protos/google/cloud/bigquery/storage/v1/protobuf.proto index e12f4d8..99a9c77 100644 --- a/src/protos/google/cloud/bigquery/storage/v1/protobuf.proto +++ b/src/protos/google/cloud/bigquery/storage/v1/protobuf.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/protos/google/cloud/bigquery/storage/v1/storage.proto b/src/protos/google/cloud/bigquery/storage/v1/storage.proto index 187bf54..d83dacc 100644 --- a/src/protos/google/cloud/bigquery/storage/v1/storage.proto +++ b/src/protos/google/cloud/bigquery/storage/v1/storage.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -348,6 +348,23 @@ message ReadRowsResponse { // Output only. Arrow schema. ArrowSchema arrow_schema = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } + + // Optional. If the row data in this ReadRowsResponse is compressed, then + // uncompressed byte size is the original size of the uncompressed row data. + // If it is set to a value greater than 0, then decompress into a buffer of + // size uncompressed_byte_size using the compression codec that was requested + // during session creation time and which is specified in + // TableReadOptions.response_compression_codec in ReadSession. + // This value is not set if no response_compression_codec was not requested + // and it is -1 if the requested compression would not have reduced the size + // of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + // behavior described here https://github.com/apache/arrow/issues/15102 where + // the uncompressed length may be set to -1 to indicate that the data that + // follows is not compressed, which can be useful for cases where compression + // does not yield appreciable savings. When uncompressed_byte_size is not + // greater than 0, the client should skip decompression. + optional int64 uncompressed_byte_size = 9 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for `SplitReadStream`. diff --git a/src/protos/google/cloud/bigquery/storage/v1/stream.proto b/src/protos/google/cloud/bigquery/storage/v1/stream.proto index 785c74f..511eb40 100644 --- a/src/protos/google/cloud/bigquery/storage/v1/stream.proto +++ b/src/protos/google/cloud/bigquery/storage/v1/stream.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -59,6 +59,21 @@ message ReadSession { // Options dictating how we read a table. message TableReadOptions { + // Specifies which compression codec to attempt on the entire serialized + // response payload (either Arrow record batch or Avro rows). This is + // not to be confused with the Apache Arrow native compression codecs + // specified in ArrowSerializationOptions. For performance reasons, when + // creating a read session requesting Arrow responses, setting both native + // Arrow compression and application-level response compression will not be + // allowed - choose, at most, one kind of compression. + enum ResponseCompressionCodec { + // Default is no compression. + RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; + + // Use raw LZ4 compression. + RESPONSE_COMPRESSION_CODEC_LZ4 = 2; + } + // Optional. The names of the fields in the table to be returned. If no // field names are specified, then all fields in the table are returned. // @@ -138,6 +153,11 @@ message ReadSession { // https://cloud.google.com/bigquery/docs/table-sampling) optional double sample_percentage = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set response_compression_codec when creating a read session to + // enable application-level compression of ReadRows responses. + optional ResponseCompressionCodec response_compression_codec = 6 + [(google.api.field_behavior) = OPTIONAL]; } // Output only. Unique identifier for the session, in the form diff --git a/src/protos/google/cloud/bigquery/storage/v1/table.proto b/src/protos/google/cloud/bigquery/storage/v1/table.proto index 47629c5..5438fd3 100644 --- a/src/protos/google/cloud/bigquery/storage/v1/table.proto +++ b/src/protos/google/cloud/bigquery/storage/v1/table.proto @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -83,6 +83,9 @@ message TableFieldSchema { // JSON, String JSON = 15; + + // RANGE + RANGE = 16; } enum Mode { @@ -96,6 +99,12 @@ message TableFieldSchema { REPEATED = 3; } + // Represents the type of a field element. + message FieldElementType { + // Required. The type of a field element. + Type type = 1 [(google.api.field_behavior) = REQUIRED]; + } + // Required. The field name. The name must contain only letters (a-z, A-Z), // numbers (0-9), or underscores (_), and must start with a letter or // underscore. The maximum length is 128 characters. @@ -168,4 +177,13 @@ message TableFieldSchema { // Optional. A SQL expression to specify the [default value] // (https://cloud.google.com/bigquery/docs/default-values) for this field. string default_value_expression = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The subtype of the RANGE, if the type of this field is RANGE. If + // the type is RANGE, this field is required. Possible values for the field + // element type of a RANGE include: + // * DATE + // * DATETIME + // * TIMESTAMP + FieldElementType range_element_type = 11 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/src/protos/google/rpc/status.proto b/src/protos/google/rpc/status.proto index 923e169..90b70dd 100644 --- a/src/protos/google/rpc/status.proto +++ b/src/protos/google/rpc/status.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.