Skip to content

Commit

Permalink
update protos
Browse files Browse the repository at this point in the history
  • Loading branch information
meztez committed Sep 30, 2024
1 parent 69f402a commit c43a364
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 54 deletions.
2 changes: 1 addition & 1 deletion src/protos/google/api/annotations.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
60 changes: 49 additions & 11 deletions src/protos/google/api/client.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/protos/google/api/field_behavior.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
50 changes: 21 additions & 29 deletions src/protos/google/api/http.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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 } ;
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/protos/google/api/launch_stage.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
11 changes: 8 additions & 3 deletions src/protos/google/api/resource.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/protos/google/cloud/bigquery/storage/v1/arrow.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/protos/google/cloud/bigquery/storage/v1/avro.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/protos/google/cloud/bigquery/storage/v1/protobuf.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
19 changes: 18 additions & 1 deletion src/protos/google/cloud/bigquery/storage/v1/storage.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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`.
Expand Down
22 changes: 21 additions & 1 deletion src/protos/google/cloud/bigquery/storage/v1/stream.proto
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.
//
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit c43a364

Please sign in to comment.