From 7886aa11fd91e9a67b015eb1ac0c922755879dcb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 13 Aug 2026 23:57:58 +0000 Subject: [PATCH 1/2] feat: add support for client-side metrics in AppendRowsRequest docs: enable client to send operational metrics in AppendRowsRequest for internal consumption Client operational metrics can now be transmitted to the server for internal use. PiperOrigin-RevId: 964315677 Source-Link: https://github.com/googleapis/googleapis/commit/707695738fc80e7d3ed8fb08253158ad052527ae Source-Link: https://github.com/googleapis/googleapis-gen/commit/3587d7f43b596e8fffebd22e9116d1f7ae62d001 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXN0b3JhZ2UtdjEvLk93bEJvdC55YW1sIiwiaCI6IjM1ODdkN2Y0M2I1OTZlOGZmZmViZDIyZTkxMTZkMWY3YWU2MmQwMDEifQ== --- .../.gitignore | 20 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-bigquery-storage-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../google-cloud-bigquery-storage-v1/Gemfile | 15 + .../LICENSE.md | 201 ++++ .../README.md | 154 +++ .../google-cloud-bigquery-storage-v1/Rakefile | 169 +++ .../gapic_metadata.json | 72 ++ .../google-cloud-bigquery-storage-v1.gemspec | 28 + .../lib/google-cloud-bigquery-storage-v1.rb | 21 + .../lib/google/cloud/bigquery/storage/v1.rb | 43 + .../bigquery/storage/v1/annotations_pb.rb | 24 + .../cloud/bigquery/storage/v1/arrow_pb.rb | 27 + .../cloud/bigquery/storage/v1/avro_pb.rb | 26 + .../bigquery/storage/v1/big_query_read.rb | 53 + .../storage/v1/big_query_read/client.rb | 756 ++++++++++++ .../storage/v1/big_query_read/credentials.rb | 54 + .../storage/v1/big_query_read/paths.rb | 108 ++ .../bigquery/storage/v1/big_query_write.rb | 56 + .../storage/v1/big_query_write/client.rb | 1028 +++++++++++++++++ .../storage/v1/big_query_write/credentials.rb | 55 + .../storage/v1/big_query_write/paths.rb | 75 ++ .../cloud/bigquery/storage/v1/protobuf_pb.rb | 26 + .../cloud/bigquery/storage/v1/storage_pb.rb | 64 + .../storage/v1/storage_services_pb.rb | 167 +++ .../cloud/bigquery/storage/v1/stream_pb.rb | 39 + .../cloud/bigquery/storage/v1/table_pb.rb | 30 + .../cloud/bigquery/storage/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/resource.rb | 227 ++++ .../google/cloud/bigquery/storage/v1/arrow.rb | 103 ++ .../google/cloud/bigquery/storage/v1/avro.rb | 95 ++ .../cloud/bigquery/storage/v1/protobuf.rb | 56 + .../cloud/bigquery/storage/v1/storage.rb | 697 +++++++++++ .../cloud/bigquery/storage/v1/stream.rb | 321 +++++ .../google/cloud/bigquery/storage/v1/table.rb | 208 ++++ .../proto_docs/google/protobuf/any.rb | 145 +++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/timestamp.rb | 128 ++ .../proto_docs/google/protobuf/wrappers.rb | 148 +++ .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../big_query_read/create_read_session.rb | 47 + .../snippets/big_query_read/read_rows.rb | 50 + .../big_query_read/split_read_stream.rb | 47 + .../snippets/big_query_write/append_rows.rb | 56 + .../batch_commit_write_streams.rb | 47 + .../big_query_write/create_write_stream.rb | 47 + .../big_query_write/finalize_write_stream.rb | 47 + .../snippets/big_query_write/flush_rows.rb | 47 + .../big_query_write/get_write_stream.rb | 47 + ...data_google.cloud.bigquery.storage.v1.json | 375 ++++++ .../storage/v1/big_query_read_paths_test.rb | 91 ++ .../storage/v1/big_query_read_test.rb | 306 +++++ .../storage/v1/big_query_write_paths_test.rb | 67 ++ .../storage/v1/big_query_write_test.rb | 503 ++++++++ .../test/helper.rb | 35 + 64 files changed, 8427 insertions(+) create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json new file mode 100644 index 000000000000..8cb93992c598 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "bigquerystorage.googleapis.com", + "api_shortname": "bigquerystorage", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest", + "distribution_name": "google-cloud-bigquery-storage-v1", + "is_cloud": true, + "language": "ruby", + "name": "bigquerystorage", + "name_pretty": "BigQuery Storage V1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs/reference/storage", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The BigQuery Storage API provides fast access to BigQuery managed storage. Note that google-cloud-bigquery-storage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-storage instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BIGQUERY_STORAGE", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/storage", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml new file mode 100644 index 000000000000..bb0c68b12d1c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-storage-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-storage-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts new file mode 100644 index 000000000000..1a833c85dd93 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Storage V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..8f8f40a73a32 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-storage-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-storage-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/storage/v1" + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/storage/v1" + +::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-bigquery-storage-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/storage/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md new file mode 100644 index 000000000000..379f7d42aadf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Storage V1 API + +API Client library for the BigQuery Storage V1 API + +The BigQuery Storage API provides fast access to BigQuery managed storage. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Storage V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-storage](https://rubygems.org/gems/google-cloud-bigquery-storage). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-storage-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerystorage.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/storage/v1" + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new +request = ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new # (request fields as keyword arguments...) +response = client.create_read_session request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/storage) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/bigquery/storage/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-bigquery-storage`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-storage-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-storage`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-bigquery-storage-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile new file mode 100644 index 000000000000..6b7aba3e8219 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-storage-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BIGQUERY_STORAGE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BIGQUERY_STORAGE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BIGQUERY_STORAGE_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BIGQUERY_STORAGE_TEST_PROJECT=test123 BIGQUERY_STORAGE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/storage/v1/big_query_read/credentials" + ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BIGQUERY_STORAGE_PROJECT"] = project + ENV["BIGQUERY_STORAGE_TEST_PROJECT"] = project + ENV["BIGQUERY_STORAGE_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-storage-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-storage-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-storage-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-storage-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-storage-v1" + header "google-cloud-bigquery-storage-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-storage-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-storage-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-storage-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-storage-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json new file mode 100644 index 000000000000..0de72ac153d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json @@ -0,0 +1,72 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.storage.v1", + "libraryPackage": "::Google::Cloud::Bigquery::Storage::V1", + "services": { + "BigQueryRead": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client", + "rpcs": { + "CreateReadSession": { + "methods": [ + "create_read_session" + ] + }, + "ReadRows": { + "methods": [ + "read_rows" + ] + }, + "SplitReadStream": { + "methods": [ + "split_read_stream" + ] + } + } + } + } + }, + "BigQueryWrite": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client", + "rpcs": { + "CreateWriteStream": { + "methods": [ + "create_write_stream" + ] + }, + "AppendRows": { + "methods": [ + "append_rows" + ] + }, + "GetWriteStream": { + "methods": [ + "get_write_stream" + ] + }, + "FinalizeWriteStream": { + "methods": [ + "finalize_write_stream" + ] + }, + "BatchCommitWriteStreams": { + "methods": [ + "batch_commit_write_streams" + ] + }, + "FlushRows": { + "methods": [ + "flush_rows" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec new file mode 100644 index 000000000000..56de5bc430bf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/storage/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-storage-v1" + gem.version = Google::Cloud::Bigquery::Storage::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The BigQuery Storage API provides fast access to BigQuery managed storage. Note that google-cloud-bigquery-storage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-storage instead. See the readme for more details." + gem.summary = "API Client library for the BigQuery Storage V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb new file mode 100644 index 000000000000..78e6f6aa0b72 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/storage/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb new file mode 100644 index 000000000000..7275f890346f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/storage/v1/big_query_read" +require "google/cloud/bigquery/storage/v1/big_query_write" +require "google/cloud/bigquery/storage/v1/version" + +module Google + module Cloud + module Bigquery + module Storage + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/storage/v1" + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/storage/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb new file mode 100644 index 000000000000..edcabf45ec84 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/annotations.proto + +require 'google/protobuf' + +require 'google/protobuf/descriptor_pb' + + +descriptor_data = "\n2google/cloud/bigquery/storage/v1/annotations.proto\x12 google.cloud.bigquery.storage.v1\x1a google/protobuf/descriptor.proto:9\n\x0b\x63olumn_name\x12\x1d.google.protobuf.FieldOptions\x18\xb5\xc3\xf7\xd8\x01 \x01(\t\x88\x01\x01\x42\xc0\x01\n$com.google.cloud.bigquery.storage.v1B\x10\x41nnotationsProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb new file mode 100644 index 000000000000..049c42b43216 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/arrow.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/bigquery/storage/v1/arrow.proto\x12 google.cloud.bigquery.storage.v1\"(\n\x0b\x41rrowSchema\x12\x19\n\x11serialized_schema\x18\x01 \x01(\x0c\"J\n\x10\x41rrowRecordBatch\x12\x1f\n\x17serialized_record_batch\x18\x01 \x01(\x0c\x12\x15\n\trow_count\x18\x02 \x01(\x03\x42\x02\x18\x01\"\xec\x03\n\x19\x41rrowSerializationOptions\x12h\n\x12\x62uffer_compression\x18\x02 \x01(\x0e\x32L.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec\x12v\n\x19picos_timestamp_precision\x18\x03 \x01(\x0e\x32S.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision\"H\n\x10\x43ompressionCodec\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\r\n\tLZ4_FRAME\x10\x01\x12\x08\n\x04ZSTD\x10\x02\"\xa2\x01\n\x17PicosTimestampPrecision\x12)\n%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1d\n\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1d\n\x19TIMESTAMP_PRECISION_PICOS\x10\x03\x42\xba\x01\n$com.google.cloud.bigquery.storage.v1B\nArrowProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ArrowSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSchema").msgclass + ArrowRecordBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowRecordBatch").msgclass + ArrowSerializationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions").msgclass + ArrowSerializationOptions::CompressionCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec").enummodule + ArrowSerializationOptions::PicosTimestampPrecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb new file mode 100644 index 000000000000..bc982922603b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/avro.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/bigquery/storage/v1/avro.proto\x12 google.cloud.bigquery.storage.v1\"\x1c\n\nAvroSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\"A\n\x08\x41vroRows\x12\x1e\n\x16serialized_binary_rows\x18\x01 \x01(\x0c\x12\x15\n\trow_count\x18\x02 \x01(\x03\x42\x02\x18\x01\"\xdd\x02\n\x18\x41vroSerializationOptions\x12%\n\x1d\x65nable_display_name_attribute\x18\x01 \x01(\x08\x12u\n\x19picos_timestamp_precision\x18\x02 \x01(\x0e\x32R.google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision\"\xa2\x01\n\x17PicosTimestampPrecision\x12)\n%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1d\n\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1d\n\x19TIMESTAMP_PRECISION_PICOS\x10\x03\x42\xb9\x01\n$com.google.cloud.bigquery.storage.v1B\tAvroProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + AvroSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSchema").msgclass + AvroRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroRows").msgclass + AvroSerializationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSerializationOptions").msgclass + AvroSerializationOptions::PicosTimestampPrecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb new file mode 100644 index 000000000000..a3ea0d4c2ac9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/storage/v1/version" + +require "google/cloud/bigquery/storage/v1/big_query_read/credentials" +require "google/cloud/bigquery/storage/v1/big_query_read/paths" +require "google/cloud/bigquery/storage/v1/big_query_read/client" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ## + # BigQuery Read API. + # + # The Read API can be used to read data from BigQuery. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/storage/v1/big_query_read" + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + module BigQueryRead + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "big_query_read", "helpers.rb" +require "google/cloud/bigquery/storage/v1/big_query_read/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb new file mode 100644 index 000000000000..4bbe6ce123ef --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb @@ -0,0 +1,756 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/storage/v1/storage_pb" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryRead + ## + # Client for the BigQueryRead service. + # + # BigQuery Read API. + # + # The Read API can be used to read data from BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerystorage.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :big_query_read_stub + + ## + # Configure the BigQueryRead Client class. + # + # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BigQueryRead clients + # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "Storage", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_read_session.timeout = 600.0 + default_config.rpcs.create_read_session.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.read_rows.timeout = 86_400.0 + default_config.rpcs.read_rows.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.split_read_stream.timeout = 600.0 + default_config.rpcs.split_read_stream.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BigQueryRead Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @big_query_read_stub.universe_domain + end + + ## + # Create a new BigQueryRead client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BigQueryRead client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/bigquery/storage/v1/storage_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @big_query_read_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @big_query_read_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @big_query_read_stub.logger + end + + # Service calls + + ## + # Creates a new read session. A read session divides the contents of a + # BigQuery table into one or more streams, which can then be used to read + # data from the table. The read session also specifies properties of the + # data to be read, such as a list of columns or a push-down filter describing + # the rows to be returned. + # + # A particular row can be read by at most one stream. When the caller has + # reached the end of each stream in the session, then all the data in the + # table has been read. + # + # Data is assigned to each stream such that roughly the same number of + # rows can be read from each stream. Because the server-side unit for + # assigning data is collections of rows, the API does not guarantee that + # each stream will return the same number or rows. Additionally, the + # limits are enforced based on the number of pre-filtered rows, so some + # filters can lead to lopsided assignments. + # + # Read sessions automatically expire 6 hours after they are created and do + # not require manual clean-up by the caller. + # + # @overload create_read_session(request, options = nil) + # Pass arguments to `create_read_session` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_read_session(parent: nil, read_session: nil, max_stream_count: nil, preferred_min_stream_count: nil) + # Pass arguments to `create_read_session` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The request project that owns the session, in the form of + # `projects/{project_id}`. + # @param read_session [::Google::Cloud::Bigquery::Storage::V1::ReadSession, ::Hash] + # Required. Session to be created. + # @param max_stream_count [::Integer] + # Max initial number of streams. If unset or zero, the server will + # provide a value of streams so as to produce reasonable throughput. Must be + # non-negative. The number of streams may be lower than the requested number, + # depending on the amount parallelism that is reasonable for the table. + # There is a default system max limit of 1,000. + # + # This must be greater than or equal to preferred_min_stream_count. + # Typically, clients should either leave this unset to let the system to + # determine an upper bound OR set this a size for the maximum "units of work" + # it can gracefully handle. + # @param preferred_min_stream_count [::Integer] + # The minimum preferred stream count. This parameter can be used to inform + # the service that there is a desired lower bound on the number of streams. + # This is typically a target parallelism of the client (e.g. a Spark + # cluster with N-workers would set this to a low multiple of N to ensure + # good cluster utilization). + # + # The system will make a best effort to provide at least this number of + # streams, but in some cases might provide less. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::ReadSession] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new + # + # # Call the create_read_session method. + # result = client.create_read_session request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession. + # p result + # + def create_read_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_read_session.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.read_session&.table + header_params["read_session.table"] = request.read_session.table + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_read_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_read_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_read_stub.call_rpc :create_read_session, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Reads rows from the stream in the format prescribed by the ReadSession. + # Each response contains one or more table rows, up to a maximum of 128 MB + # per response; read requests which attempt to read individual rows larger + # than 128 MB will fail. + # + # Each request also returns a set of stream statistics reflecting the current + # state of the stream. + # + # @overload read_rows(request, options = nil) + # Pass arguments to `read_rows` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload read_rows(read_stream: nil, offset: nil, arrow_serialization_options: nil) + # Pass arguments to `read_rows` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param read_stream [::String] + # Required. Stream to read rows from. + # @param offset [::Integer] + # The offset requested must be less than the last row read from Read. + # Requesting a larger offset is undefined. If not specified, start reading + # from offset zero. + # @param arrow_serialization_options [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions, ::Hash] + # Optional. Options specific to the Apache Arrow output format. + # + # This feature is not yet available. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new + # + # # Call the read_rows method to start streaming. + # output = client.read_rows request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse + # output.each do |current_response| + # p current_response + # end + # + def read_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.read_rows.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.read_stream + header_params["read_stream"] = request.read_stream + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.read_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.read_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_read_stub.call_rpc :read_rows, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Splits a given `ReadStream` into two `ReadStream` objects. These + # `ReadStream` objects are referred to as the primary and the residual + # streams of the split. The original `ReadStream` can still be read from in + # the same manner as before. Both of the returned `ReadStream` objects can + # also be read from, and the rows returned by both child streams will be + # the same as the rows read from the original stream. + # + # Moreover, the two child streams will be allocated back-to-back in the + # original `ReadStream`. Concretely, it is guaranteed that for streams + # original, primary, and residual, that original[0-j] = primary[0-j] and + # original[j-n] = residual[0-m] once the streams have been read to + # completion. + # + # @overload split_read_stream(request, options = nil) + # Pass arguments to `split_read_stream` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload split_read_stream(name: nil, fraction: nil) + # Pass arguments to `split_read_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the stream to split. + # @param fraction [::Float] + # A value in the range (0.0, 1.0) that specifies the fractional point at + # which the original stream should be split. The actual split point is + # evaluated on pre-filtered rows, so if a filter is provided, then there is + # no guarantee that the division of the rows between the new child streams + # will be proportional to this fractional value. Additionally, because the + # server-side unit for assigning data is collections of rows, this fraction + # will always map to a data storage boundary on the server side. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new + # + # # Call the split_read_stream method. + # result = client.split_read_stream request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse. + # p result + # + def split_read_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.split_read_stream.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.split_read_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.split_read_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_read_stub.call_rpc :split_read_stream, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BigQueryRead API. + # + # This class represents the configuration for BigQueryRead, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_read_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_read_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_read_session.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "bigquerystorage.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BigQueryRead API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_read_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_read_session + ## + # RPC-specific configuration for `read_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :read_rows + ## + # RPC-specific configuration for `split_read_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :split_read_stream + + # @private + def initialize parent_rpcs = nil + create_read_session_config = parent_rpcs.create_read_session if parent_rpcs.respond_to? :create_read_session + @create_read_session = ::Gapic::Config::Method.new create_read_session_config + read_rows_config = parent_rpcs.read_rows if parent_rpcs.respond_to? :read_rows + @read_rows = ::Gapic::Config::Method.new read_rows_config + split_read_stream_config = parent_rpcs.split_read_stream if parent_rpcs.respond_to? :split_read_stream + @split_read_stream = ::Gapic::Config::Method.new split_read_stream_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb new file mode 100644 index 000000000000..4011779342be --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryRead + # Credentials for the BigQueryRead API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BIGQUERY_STORAGE_CREDENTIALS", + "BIGQUERY_STORAGE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BIGQUERY_STORAGE_CREDENTIALS_JSON", + "BIGQUERY_STORAGE_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb new file mode 100644 index 000000000000..6d1133365b75 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryRead + # Path helper methods for the BigQueryRead API. + module Paths + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified ReadSession resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param session [String] + # + # @return [::String] + def read_session_path project:, location:, session: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sessions/#{session}" + end + + ## + # Create a fully-qualified ReadStream resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sessions/{session}/streams/{stream}` + # + # @param project [String] + # @param location [String] + # @param session [String] + # @param stream [String] + # + # @return [::String] + def read_stream_path project:, location:, session:, stream: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sessions/#{session}/streams/#{stream}" + end + + ## + # Create a fully-qualified Table resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/tables/{table}` + # + # @param project [String] + # @param dataset [String] + # @param table [String] + # + # @return [::String] + def table_path project:, dataset:, table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/tables/#{table}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb new file mode 100644 index 000000000000..aeb7c756898f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/storage/v1/version" + +require "google/cloud/bigquery/storage/v1/big_query_write/credentials" +require "google/cloud/bigquery/storage/v1/big_query_write/paths" +require "google/cloud/bigquery/storage/v1/big_query_write/client" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ## + # BigQuery Write API. + # + # The Write API can be used to write data to BigQuery. + # + # For supplementary information about the Write API, see: + # https://cloud.google.com/bigquery/docs/write-api + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/storage/v1/big_query_write" + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + module BigQueryWrite + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "big_query_write", "helpers.rb" +require "google/cloud/bigquery/storage/v1/big_query_write/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb new file mode 100644 index 000000000000..8db0dfb2fc30 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb @@ -0,0 +1,1028 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/bigquery/storage/v1/storage_pb" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryWrite + ## + # Client for the BigQueryWrite service. + # + # BigQuery Write API. + # + # The Write API can be used to write data to BigQuery. + # + # For supplementary information about the Write API, see: + # https://cloud.google.com/bigquery/docs/write-api + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerystorage.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :big_query_write_stub + + ## + # Configure the BigQueryWrite Client class. + # + # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BigQueryWrite clients + # ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "Storage", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_write_stream.timeout = 1200.0 + default_config.rpcs.create_write_stream.retry_policy = { + initial_delay: 10.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config.rpcs.append_rows.timeout = 86_400.0 + default_config.rpcs.append_rows.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_write_stream.timeout = 600.0 + default_config.rpcs.get_write_stream.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config.rpcs.finalize_write_stream.timeout = 600.0 + default_config.rpcs.finalize_write_stream.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config.rpcs.batch_commit_write_streams.timeout = 600.0 + default_config.rpcs.batch_commit_write_streams.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config.rpcs.flush_rows.timeout = 600.0 + default_config.rpcs.flush_rows.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BigQueryWrite Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @big_query_write_stub.universe_domain + end + + ## + # Create a new BigQueryWrite client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BigQueryWrite client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/bigquery/storage/v1/storage_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @big_query_write_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @big_query_write_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @big_query_write_stub.logger + end + + # Service calls + + ## + # Creates a write stream to the given table. + # Additionally, every table has a special stream named '_default' + # to which data can be written. This stream doesn't need to be created using + # CreateWriteStream. It is a stream that can be used simultaneously by any + # number of clients. Data written to this stream is considered committed as + # soon as an acknowledgement is received. + # + # @overload create_write_stream(request, options = nil) + # Pass arguments to `create_write_stream` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_write_stream(parent: nil, write_stream: nil) + # Pass arguments to `create_write_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Reference to the table to which the stream belongs, in the format + # of `projects/{project}/datasets/{dataset}/tables/{table}`. + # @param write_stream [::Google::Cloud::Bigquery::Storage::V1::WriteStream, ::Hash] + # Required. Stream to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new + # + # # Call the create_write_stream method. + # result = client.create_write_stream request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. + # p result + # + def create_write_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_write_stream.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_write_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_write_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :create_write_stream, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Appends data to the given stream. + # + # If `offset` is specified, the `offset` is checked against the end of + # stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an + # attempt is made to append to an offset beyond the current end of the stream + # or `ALREADY_EXISTS` if user provides an `offset` that has already been + # written to. User can retry with adjusted offset within the same RPC + # connection. If `offset` is not specified, append happens at the end of the + # stream. + # + # The response contains an optional offset at which the append + # happened. No offset information will be returned for appends to a + # default stream. + # + # Responses are received in the same order in which requests are sent. + # There will be one response for each successful inserted request. Responses + # may optionally embed error information if the originating AppendRequest was + # not successfully processed. + # + # The specifics of when successfully appended data is made visible to the + # table are governed by the type of stream: + # + # * For COMMITTED streams (which includes the default stream), data is + # visible immediately upon successful append. + # + # * For BUFFERED streams, data is made visible via a subsequent `FlushRows` + # rpc which advances a cursor to a newer offset in the stream. + # + # * For PENDING streams, data is not made visible until the stream itself is + # finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly + # committed via the `BatchCommitWriteStreams` rpc. + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest, ::Hash>] + # An enumerable of {::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the append_rows method to start streaming. + # output = client.append_rows input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new + # input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse + # output.each do |current_response| + # p current_response + # end + # + def append_rows request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest + end + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.append_rows.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.append_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.append_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :append_rows, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets information about a write stream. + # + # @overload get_write_stream(request, options = nil) + # Pass arguments to `get_write_stream` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_write_stream(name: nil, view: nil) + # Pass arguments to `get_write_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the stream to get, in the form of + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + # @param view [::Google::Cloud::Bigquery::Storage::V1::WriteStreamView] + # Indicates whether to get full or partial view of the WriteStream. If + # not set, view returned will be basic. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new + # + # # Call the get_write_stream method. + # result = client.get_write_stream request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. + # p result + # + def get_write_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_write_stream.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_write_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_write_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :get_write_stream, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Finalize a write stream so that no new data can be appended to the + # stream. Finalize is not supported on the '_default' stream. + # + # @overload finalize_write_stream(request, options = nil) + # Pass arguments to `finalize_write_stream` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload finalize_write_stream(name: nil) + # Pass arguments to `finalize_write_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the stream to finalize, in the form of + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new + # + # # Call the finalize_write_stream method. + # result = client.finalize_write_stream request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse. + # p result + # + def finalize_write_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.finalize_write_stream.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.finalize_write_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.finalize_write_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :finalize_write_stream, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Atomically commits a group of `PENDING` streams that belong to the same + # `parent` table. + # + # Streams must be finalized before commit and cannot be committed multiple + # times. Once a stream is committed, data in the stream becomes available + # for read operations. + # + # @overload batch_commit_write_streams(request, options = nil) + # Pass arguments to `batch_commit_write_streams` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_commit_write_streams(parent: nil, write_streams: nil) + # Pass arguments to `batch_commit_write_streams` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent table that all the streams should belong to, in the form + # of `projects/{project}/datasets/{dataset}/tables/{table}`. + # @param write_streams [::Array<::String>] + # Required. The group of streams that will be committed atomically. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new + # + # # Call the batch_commit_write_streams method. + # result = client.batch_commit_write_streams request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse. + # p result + # + def batch_commit_write_streams request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_commit_write_streams.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_commit_write_streams.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_commit_write_streams.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :batch_commit_write_streams, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Flushes rows to a BUFFERED stream. + # + # If users are appending rows to BUFFERED stream, flush operation is + # required in order for the rows to become available for reading. A + # Flush operation flushes up to any previously flushed offset in a BUFFERED + # stream, to the offset specified in the request. + # + # Flush is not supported on the _default stream, since it is not BUFFERED. + # + # @overload flush_rows(request, options = nil) + # Pass arguments to `flush_rows` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload flush_rows(write_stream: nil, offset: nil) + # Pass arguments to `flush_rows` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param write_stream [::String] + # Required. The stream that is the target of the flush operation. + # @param offset [::Google::Protobuf::Int64Value, ::Hash] + # Ending offset of the flush operation. Rows before this offset(including + # this offset) will be flushed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new + # + # # Call the flush_rows method. + # result = client.flush_rows request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse. + # p result + # + def flush_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.flush_rows.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.write_stream + header_params["write_stream"] = request.write_stream + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.flush_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.flush_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :flush_rows, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BigQueryWrite API. + # + # This class represents the configuration for BigQueryWrite, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_write_stream to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_write_stream.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_write_stream.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "bigquerystorage.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BigQueryWrite API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_write_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :create_write_stream + ## + # RPC-specific configuration for `append_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :append_rows + ## + # RPC-specific configuration for `get_write_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :get_write_stream + ## + # RPC-specific configuration for `finalize_write_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :finalize_write_stream + ## + # RPC-specific configuration for `batch_commit_write_streams` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_commit_write_streams + ## + # RPC-specific configuration for `flush_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :flush_rows + + # @private + def initialize parent_rpcs = nil + create_write_stream_config = parent_rpcs.create_write_stream if parent_rpcs.respond_to? :create_write_stream + @create_write_stream = ::Gapic::Config::Method.new create_write_stream_config + append_rows_config = parent_rpcs.append_rows if parent_rpcs.respond_to? :append_rows + @append_rows = ::Gapic::Config::Method.new append_rows_config + get_write_stream_config = parent_rpcs.get_write_stream if parent_rpcs.respond_to? :get_write_stream + @get_write_stream = ::Gapic::Config::Method.new get_write_stream_config + finalize_write_stream_config = parent_rpcs.finalize_write_stream if parent_rpcs.respond_to? :finalize_write_stream + @finalize_write_stream = ::Gapic::Config::Method.new finalize_write_stream_config + batch_commit_write_streams_config = parent_rpcs.batch_commit_write_streams if parent_rpcs.respond_to? :batch_commit_write_streams + @batch_commit_write_streams = ::Gapic::Config::Method.new batch_commit_write_streams_config + flush_rows_config = parent_rpcs.flush_rows if parent_rpcs.respond_to? :flush_rows + @flush_rows = ::Gapic::Config::Method.new flush_rows_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb new file mode 100644 index 000000000000..882a98244bb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryWrite + # Credentials for the BigQueryWrite API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/bigquery.insertdata", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BIGQUERY_STORAGE_CREDENTIALS", + "BIGQUERY_STORAGE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BIGQUERY_STORAGE_CREDENTIALS_JSON", + "BIGQUERY_STORAGE_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb new file mode 100644 index 000000000000..e907c52fd001 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryWrite + # Path helper methods for the BigQueryWrite API. + module Paths + ## + # Create a fully-qualified Table resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/tables/{table}` + # + # @param project [String] + # @param dataset [String] + # @param table [String] + # + # @return [::String] + def table_path project:, dataset:, table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/tables/#{table}" + end + + ## + # Create a fully-qualified WriteStream resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}` + # + # @param project [String] + # @param dataset [String] + # @param table [String] + # @param stream [String] + # + # @return [::String] + def write_stream_path project:, dataset:, table:, stream: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/tables/#{table}/streams/#{stream}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb new file mode 100644 index 000000000000..6d9356041918 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/protobuf.proto + +require 'google/protobuf' + +require 'google/protobuf/descriptor_pb' + + +descriptor_data = "\n/google/cloud/bigquery/storage/v1/protobuf.proto\x12 google.cloud.bigquery.storage.v1\x1a google/protobuf/descriptor.proto\"I\n\x0bProtoSchema\x12:\n\x10proto_descriptor\x18\x01 \x01(\x0b\x32 .google.protobuf.DescriptorProto\"$\n\tProtoRows\x12\x17\n\x0fserialized_rows\x18\x01 \x03(\x0c\x42\xbd\x01\n$com.google.cloud.bigquery.storage.v1B\rProtoBufProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ProtoSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ProtoSchema").msgclass + ProtoRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ProtoRows").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb new file mode 100644 index 000000000000..42b7a9dc062f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/storage.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/storage/v1/arrow_pb' +require 'google/cloud/bigquery/storage/v1/avro_pb' +require 'google/cloud/bigquery/storage/v1/protobuf_pb' +require 'google/cloud/bigquery/storage/v1/stream_pb' +require 'google/cloud/bigquery/storage/v1/table_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a/google/cloud/bigquery/storage/v1/protobuf.proto\x1a-google/cloud/bigquery/storage/v1/stream.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xe7\x01\n\x18\x43reateReadSessionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x0cread_session\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xe0\x41\x02\x12\x18\n\x10max_stream_count\x18\x03 \x01(\x05\x12\"\n\x1apreferred_min_stream_count\x18\x04 \x01(\x05\"\xf9\x01\n\x0fReadRowsRequest\x12\x46\n\x0bread_stream\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x0e\n\x06offset\x18\x02 \x01(\x03\x12g\n\x1b\x61rrow_serialization_options\x18\x05 \x01(\x0b\x32;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xe0\x41\x01H\x00\x42%\n#output_format_serialization_options\")\n\rThrottleState\x12\x18\n\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\n\x0bStreamStats\x12H\n\x08progress\x18\x02 \x01(\x0b\x32\x36.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1a>\n\x08Progress\x12\x19\n\x11\x61t_response_start\x18\x01 \x01(\x01\x12\x17\n\x0f\x61t_response_end\x18\x02 \x01(\x01\"\xf7\x04\n\x10ReadRowsResponse\x12?\n\tavro_rows\x18\x03 \x01(\x0b\x32*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\n\x12\x61rrow_record_batch\x18\x04 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\n\trow_count\x18\x06 \x01(\x03\x12<\n\x05stats\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.StreamStats\x12G\n\x0ethrottle_state\x18\x05 \x01(\x0b\x32/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\n\x0b\x61vro_schema\x18\x07 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x01\x12J\n\x0c\x61rrow_schema\x18\x08 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x01\x12(\n\x16uncompressed_byte_size\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12+\n\x19total_estimated_row_count\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x06\n\x04rowsB\x08\n\x06schemaB\x19\n\x17_uncompressed_byte_sizeB\x1c\n\x1a_total_estimated_row_count\"k\n\x16SplitReadStreamRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x10\n\x08\x66raction\x18\x02 \x01(\x01\"\xa7\x01\n\x17SplitReadStreamResponse\x12\x44\n\x0eprimary_stream\x18\x01 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\x12\x46\n\x10remainder_stream\x18\x02 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\"\x9b\x01\n\x18\x43reateWriteStreamRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12H\n\x0cwrite_stream\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xe0\x41\x02\"\xc2\t\n\x11\x41ppendRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12S\n\nproto_rows\x18\x04 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\n\narrow_rows\x18\x05 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\n\x08trace_id\x18\x06 \x01(\t\x12{\n\x1dmissing_value_interpretations\x18\x07 \x03(\x0b\x32T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\n$default_missing_value_interpretation\x18\x08 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xe0\x41\x01\x12H\n\x0c\x63lient_stats\x18\t \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ClientStatsB\x03\xe0\x41\x01\x1a\x93\x01\n\tArrowData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\n\x04rows\x18\x02 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1a\x8c\x01\n\tProtoData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ProtoSchema\x12\x39\n\x04rows\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.storage.v1.ProtoRows\x1a\x92\x01\n MissingValueInterpretationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12]\n\x05value\x18\x02 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x02\x38\x01\"m\n\x1aMissingValueInterpretation\x12,\n(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0e\n\nNULL_VALUE\x10\x01\x12\x11\n\rDEFAULT_VALUE\x10\x02\x42\x06\n\x04rows\"\xfb\x02\n\x12\x41ppendRowsResponse\x12Z\n\rappend_result\x18\x01 \x01(\x0b\x32\x41.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x45\n\x0eupdated_schema\x18\x03 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchema\x12>\n\nrow_errors\x18\x04 \x03(\x0b\x32*.google.cloud.bigquery.storage.v1.RowError\x12\x14\n\x0cwrite_stream\x18\x05 \x01(\t\x1a;\n\x0c\x41ppendResult\x12+\n\x06offset\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\n\n\x08response\"\x9a\x01\n\x15GetWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12?\n\x04view\x18\x03 \x01(\x0e\x32\x31.google.cloud.bigquery.storage.v1.WriteStreamView\"s\n\x1e\x42\x61tchCommitWriteStreamsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12\x1a\n\rwrite_streams\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x99\x01\n\x1f\x42\x61tchCommitWriteStreamsResponse\x12/\n\x0b\x63ommit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\rstream_errors\x18\x02 \x03(\x0b\x32..google.cloud.bigquery.storage.v1.StorageError\"^\n\x1a\x46inalizeWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\"0\n\x1b\x46inalizeWriteStreamResponse\x12\x11\n\trow_count\x18\x01 \x01(\x03\"\x89\x01\n\x10\x46lushRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"#\n\x11\x46lushRowsResponse\x12\x0e\n\x06offset\x18\x01 \x01(\x03\"\xa4\x04\n\x0cStorageError\x12M\n\x04\x63ode\x18\x01 \x01(\x0e\x32?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\t\"\x9d\x03\n\x10StorageErrorCode\x12\"\n\x1eSTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fTABLE_NOT_FOUND\x10\x01\x12\x1c\n\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\n\x10STREAM_NOT_FOUND\x10\x03\x12\x17\n\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\n\x14INVALID_STREAM_STATE\x10\x05\x12\x14\n\x10STREAM_FINALIZED\x10\x06\x12 \n\x1cSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\n\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\n\x13OFFSET_OUT_OF_RANGE\x10\t\x12\x15\n\x11\x43MEK_NOT_PROVIDED\x10\n\x12\x19\n\x15INVALID_CMEK_PROVIDED\x10\x0b\x12\x19\n\x15\x43MEK_ENCRYPTION_ERROR\x10\x0c\x12\x15\n\x11KMS_SERVICE_ERROR\x10\r\x12\x19\n\x15KMS_PERMISSION_DENIED\x10\x0e\"\xb3\x01\n\x08RowError\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x45\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0f\n\x07message\x18\x03 \x01(\t\"@\n\x0cRowErrorCode\x12\x1e\n\x1aROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46IELDS_ERROR\x10\x01\"\x96\x07\n\x0b\x43lientStats\x12V\n\rrequest_stats\x18\x01 \x01(\x0b\x32:.google.cloud.bigquery.storage.v1.ClientStats.RequestStatsB\x03\xe0\x41\x01\x12T\n\x0cwindow_stats\x18\x02 \x01(\x0b\x32\x39.google.cloud.bigquery.storage.v1.ClientStats.WindowStatsB\x03\xe0\x41\x01\x1a\x8a\x01\n\x0cRequestStats\x12\"\n\x10send_time_millis\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15queued_requests_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_send_time_millisB\x18\n\x16_queued_requests_count\x1a\xcb\x04\n\x0bWindowStats\x12-\n\x1bmax_response_latency_millis\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x1b\x61vg_response_latency_millis\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x1flongest_wait_no_response_millis\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12%\n\x13requests_sent_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12*\n\x18responses_received_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10\x62ytes_sent_count\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x30\n\x1ewindow_start_time_epoch_millis\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x1f\n\rwindow_millis\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x42\x1e\n\x1c_max_response_latency_millisB\x1e\n\x1c_avg_response_latency_millisB\"\n _longest_wait_no_response_millisB\x16\n\x14_requests_sent_countB\x1b\n\x19_responses_received_countB\x13\n\x11_bytes_sent_countB!\n\x1f_window_start_time_epoch_millisB\x10\n\x0e_window_millis2\x92\x06\n\x0c\x42igQueryRead\x12\xe9\x01\n\x11\x43reateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1a-.google.cloud.bigquery.storage.v1.ReadSession\"i\xda\x41$parent,read_session,max_stream_count\x82\xd3\xe4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xcf\x01\n\x08ReadRows\x12\x31.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1a\x32.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xda\x41\x12read_stream,offset\x82\xd3\xe4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xc6\x01\n\x0fSplitReadStream\x12\x38.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1a\x39.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1a{\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xbc\x0b\n\rBigQueryWrite\x12\xd7\x01\n\x11\x43reateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"W\xda\x41\x13parent,write_stream\x82\xd3\xe4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0cwrite_stream\x12\xd2\x01\n\nAppendRows\x12\x33.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1a\x34.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x01\x30\x01\x12\xbf\x01\n\x0eGetWriteStream\x12\x37.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xd9\x01\n\x13\x46inalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1a=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xdc\x01\n\x17\x42\x61tchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1a\x41.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xcb\x01\n\tFlushRows\x12\x32.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1a\x33.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1a\xb0\x01\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\n$com.google.cloud.bigquery.storage.v1B\x0cStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + CreateReadSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.CreateReadSessionRequest").msgclass + ReadRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadRowsRequest").msgclass + ThrottleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ThrottleState").msgclass + StreamStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StreamStats").msgclass + StreamStats::Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StreamStats.Progress").msgclass + ReadRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadRowsResponse").msgclass + SplitReadStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.SplitReadStreamRequest").msgclass + SplitReadStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.SplitReadStreamResponse").msgclass + CreateWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.CreateWriteStreamRequest").msgclass + AppendRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest").msgclass + AppendRowsRequest::ArrowData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData").msgclass + AppendRowsRequest::ProtoData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData").msgclass + AppendRowsRequest::MissingValueInterpretation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation").enummodule + AppendRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsResponse").msgclass + AppendRowsResponse::AppendResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult").msgclass + GetWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.GetWriteStreamRequest").msgclass + BatchCommitWriteStreamsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest").msgclass + BatchCommitWriteStreamsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse").msgclass + FinalizeWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest").msgclass + FinalizeWriteStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse").msgclass + FlushRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FlushRowsRequest").msgclass + FlushRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FlushRowsResponse").msgclass + StorageError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError").msgclass + StorageError::StorageErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode").enummodule + RowError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError").msgclass + RowError::RowErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError.RowErrorCode").enummodule + ClientStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats").msgclass + ClientStats::RequestStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats.RequestStats").msgclass + ClientStats::WindowStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats.WindowStats").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb new file mode 100644 index 000000000000..ffd73ad9f783 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb @@ -0,0 +1,167 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/storage/v1/storage.proto for package 'google.cloud.bigquery.storage.v1' +# Original file comments: +# Copyright 2026 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. +# + +require 'grpc' +require 'google/cloud/bigquery/storage/v1/storage_pb' + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryRead + # BigQuery Read API. + # + # The Read API can be used to read data from BigQuery. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.storage.v1.BigQueryRead' + + # Creates a new read session. A read session divides the contents of a + # BigQuery table into one or more streams, which can then be used to read + # data from the table. The read session also specifies properties of the + # data to be read, such as a list of columns or a push-down filter describing + # the rows to be returned. + # + # A particular row can be read by at most one stream. When the caller has + # reached the end of each stream in the session, then all the data in the + # table has been read. + # + # Data is assigned to each stream such that roughly the same number of + # rows can be read from each stream. Because the server-side unit for + # assigning data is collections of rows, the API does not guarantee that + # each stream will return the same number or rows. Additionally, the + # limits are enforced based on the number of pre-filtered rows, so some + # filters can lead to lopsided assignments. + # + # Read sessions automatically expire 6 hours after they are created and do + # not require manual clean-up by the caller. + rpc :CreateReadSession, ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Google::Cloud::Bigquery::Storage::V1::ReadSession + # Reads rows from the stream in the format prescribed by the ReadSession. + # Each response contains one or more table rows, up to a maximum of 128 MB + # per response; read requests which attempt to read individual rows larger + # than 128 MB will fail. + # + # Each request also returns a set of stream statistics reflecting the current + # state of the stream. + rpc :ReadRows, ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, stream(::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse) + # Splits a given `ReadStream` into two `ReadStream` objects. These + # `ReadStream` objects are referred to as the primary and the residual + # streams of the split. The original `ReadStream` can still be read from in + # the same manner as before. Both of the returned `ReadStream` objects can + # also be read from, and the rows returned by both child streams will be + # the same as the rows read from the original stream. + # + # Moreover, the two child streams will be allocated back-to-back in the + # original `ReadStream`. Concretely, it is guaranteed that for streams + # original, primary, and residual, that original[0-j] = primary[0-j] and + # original[j-n] = residual[0-m] once the streams have been read to + # completion. + rpc :SplitReadStream, ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse + end + + Stub = Service.rpc_stub_class + end + module BigQueryWrite + # BigQuery Write API. + # + # The Write API can be used to write data to BigQuery. + # + # For supplementary information about the Write API, see: + # https://cloud.google.com/bigquery/docs/write-api + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.storage.v1.BigQueryWrite' + + # Creates a write stream to the given table. + # Additionally, every table has a special stream named '_default' + # to which data can be written. This stream doesn't need to be created using + # CreateWriteStream. It is a stream that can be used simultaneously by any + # number of clients. Data written to this stream is considered committed as + # soon as an acknowledgement is received. + rpc :CreateWriteStream, ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::WriteStream + # Appends data to the given stream. + # + # If `offset` is specified, the `offset` is checked against the end of + # stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an + # attempt is made to append to an offset beyond the current end of the stream + # or `ALREADY_EXISTS` if user provides an `offset` that has already been + # written to. User can retry with adjusted offset within the same RPC + # connection. If `offset` is not specified, append happens at the end of the + # stream. + # + # The response contains an optional offset at which the append + # happened. No offset information will be returned for appends to a + # default stream. + # + # Responses are received in the same order in which requests are sent. + # There will be one response for each successful inserted request. Responses + # may optionally embed error information if the originating AppendRequest was + # not successfully processed. + # + # The specifics of when successfully appended data is made visible to the + # table are governed by the type of stream: + # + # * For COMMITTED streams (which includes the default stream), data is + # visible immediately upon successful append. + # + # * For BUFFERED streams, data is made visible via a subsequent `FlushRows` + # rpc which advances a cursor to a newer offset in the stream. + # + # * For PENDING streams, data is not made visible until the stream itself is + # finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly + # committed via the `BatchCommitWriteStreams` rpc. + rpc :AppendRows, stream(::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest), stream(::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse) + # Gets information about a write stream. + rpc :GetWriteStream, ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::WriteStream + # Finalize a write stream so that no new data can be appended to the + # stream. Finalize is not supported on the '_default' stream. + rpc :FinalizeWriteStream, ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse + # Atomically commits a group of `PENDING` streams that belong to the same + # `parent` table. + # + # Streams must be finalized before commit and cannot be committed multiple + # times. Once a stream is committed, data in the stream becomes available + # for read operations. + rpc :BatchCommitWriteStreams, ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse + # Flushes rows to a BUFFERED stream. + # + # If users are appending rows to BUFFERED stream, flush operation is + # required in order for the rows to become available for reading. A + # Flush operation flushes up to any previously flushed offset in a BUFFERED + # stream, to the offset specified in the request. + # + # Flush is not supported on the _default stream, since it is not BUFFERED. + rpc :FlushRows, ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, ::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb new file mode 100644 index 000000000000..ab4d8b662d0b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/stream.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/storage/v1/arrow_pb' +require 'google/cloud/bigquery/storage/v1/avro_pb' +require 'google/cloud/bigquery/storage/v1/table_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/bigquery/storage/v1/stream.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc3\x0c\n\x0bReadSession\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x0b\x64\x61ta_format\x18\x03 \x01(\x0e\x32,.google.cloud.bigquery.storage.v1.DataFormatB\x03\xe0\x41\x05\x12H\n\x0b\x61vro_schema\x18\x04 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x00\x12J\n\x0c\x61rrow_schema\x18\x05 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x00\x12\x34\n\x05table\x18\x06 \x01(\tB%\xe0\x41\x05\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12Z\n\x0ftable_modifiers\x18\x07 \x01(\x0b\x32<.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersB\x03\xe0\x41\x01\x12Y\n\x0cread_options\x18\x08 \x01(\x0b\x32>.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsB\x03\xe0\x41\x01\x12\x42\n\x07streams\x18\n \x03(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStreamB\x03\xe0\x41\x03\x12*\n\x1d\x65stimated_total_bytes_scanned\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03\x12/\n\"estimated_total_physical_file_size\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x65stimated_row_count\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08trace_id\x18\r \x01(\tB\x03\xe0\x41\x01\x1a\x43\n\x0eTableModifiers\x12\x31\n\rsnapshot_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x89\x05\n\x10TableReadOptions\x12\x17\n\x0fselected_fields\x18\x01 \x03(\t\x12\x17\n\x0frow_restriction\x18\x02 \x01(\t\x12g\n\x1b\x61rrow_serialization_options\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xe0\x41\x01H\x00\x12\x65\n\x1a\x61vro_serialization_options\x18\x04 \x01(\x0b\x32:.google.cloud.bigquery.storage.v1.AvroSerializationOptionsB\x03\xe0\x41\x01H\x00\x12#\n\x11sample_percentage\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x85\x01\n\x1aresponse_compression_codec\x18\x06 \x01(\x0e\x32W.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodecB\x03\xe0\x41\x01H\x02\x88\x01\x01\"j\n\x18ResponseCompressionCodec\x12*\n&RESPONSE_COMPRESSION_CODEC_UNSPECIFIED\x10\x00\x12\"\n\x1eRESPONSE_COMPRESSION_CODEC_LZ4\x10\x02\x42%\n#output_format_serialization_optionsB\x14\n\x12_sample_percentageB\x1d\n\x1b_response_compression_codec:k\xea\x41h\n*bigquerystorage.googleapis.com/ReadSession\x12:projects/{project}/locations/{location}/sessions/{session}B\x08\n\x06schema\"\x9c\x01\n\nReadStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03:{\xea\x41x\n)bigquerystorage.googleapis.com/ReadStream\x12Kprojects/{project}/locations/{location}/sessions/{session}/streams/{stream}\"\xfb\x04\n\x0bWriteStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x02 \x01(\x0e\x32\x32.google.cloud.bigquery.storage.v1.WriteStream.TypeB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63ommit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0ctable_schema\x18\x05 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchemaB\x03\xe0\x41\x03\x12P\n\nwrite_mode\x18\x07 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.WriteStream.WriteModeB\x03\xe0\x41\x05\x12\x15\n\x08location\x18\x08 \x01(\tB\x03\xe0\x41\x03\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCOMMITTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0c\n\x08\x42UFFERED\x10\x03\"3\n\tWriteMode\x12\x1a\n\x16WRITE_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06INSERT\x10\x01:v\xea\x41s\n*bigquerystorage.googleapis.com/WriteStream\x12\x45projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}*>\n\nDataFormat\x12\x1b\n\x17\x44\x41TA_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41VRO\x10\x01\x12\t\n\x05\x41RROW\x10\x02*I\n\x0fWriteStreamView\x12!\n\x1dWRITE_STREAM_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\xbb\x01\n$com.google.cloud.bigquery.storage.v1B\x0bStreamProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ReadSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession").msgclass + ReadSession::TableModifiers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableModifiers").msgclass + ReadSession::TableReadOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions").msgclass + ReadSession::TableReadOptions::ResponseCompressionCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec").enummodule + ReadStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadStream").msgclass + WriteStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream").msgclass + WriteStream::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream.Type").enummodule + WriteStream::WriteMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream.WriteMode").enummodule + DataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.DataFormat").enummodule + WriteStreamView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStreamView").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb new file mode 100644 index 000000000000..2550b8886063 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/table.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n,google/cloud/bigquery/storage/v1/table.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/wrappers.proto\"Q\n\x0bTableSchema\x12\x42\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.storage.v1.TableFieldSchema\"\xbc\x07\n\x10TableFieldSchema\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xe0\x41\x02\x12J\n\x04mode\x18\x03 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.ModeB\x03\xe0\x41\x01\x12G\n\x06\x66ields\x18\x04 \x03(\x0b\x32\x32.google.cloud.bigquery.storage.v1.TableFieldSchemaB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmax_length\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tprecision\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x12\n\x05scale\x18\t \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18\x64\x65\x66\x61ult_value_expression\x18\n \x01(\tB\x03\xe0\x41\x01\x12=\n\x13timestamp_precision\x18\x1b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\x12\x64\n\x12range_element_type\x18\x0b \x01(\x0b\x32\x43.google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementTypeB\x03\xe0\x41\x01\x1a^\n\x10\x46ieldElementType\x12J\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xe0\x41\x02\"\xe0\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\n\n\x06STRUCT\x10\x04\x12\t\n\x05\x42YTES\x10\x05\x12\x08\n\x04\x42OOL\x10\x06\x12\r\n\tTIMESTAMP\x10\x07\x12\x08\n\x04\x44\x41TE\x10\x08\x12\x08\n\x04TIME\x10\t\x12\x0c\n\x08\x44\x41TETIME\x10\n\x12\r\n\tGEOGRAPHY\x10\x0b\x12\x0b\n\x07NUMERIC\x10\x0c\x12\x0e\n\nBIGNUMERIC\x10\r\x12\x0c\n\x08INTERVAL\x10\x0e\x12\x08\n\x04JSON\x10\x0f\x12\t\n\x05RANGE\x10\x10\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08NULLABLE\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\x42\xba\x01\n$com.google.cloud.bigquery.storage.v1B\nTableProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + TableSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableSchema").msgclass + TableFieldSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema").msgclass + TableFieldSchema::FieldElementType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType").msgclass + TableFieldSchema::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.Type").enummodule + TableFieldSchema::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.Mode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb new file mode 100644 index 000000000000..6f9c0d00974c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md new file mode 100644 index 000000000000..3d8a2a34b334 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Storage V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # 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. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # 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... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # 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. + module FieldBehavior + # Conventional default for enums. Do not use this. + 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. + 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`). + 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). + 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. + 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. + 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. + 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. + 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. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # 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'. 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 + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb new file mode 100644 index 000000000000..a3dc9a444a1f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + # Arrow schema as specified in + # https://arrow.apache.org/docs/python/api/datatypes.html + # and serialized to bytes using IPC: + # https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc + # + # See code samples on how this message can be deserialized. + # @!attribute [rw] serialized_schema + # @return [::String] + # IPC serialized Arrow schema. + class ArrowSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Arrow RecordBatch. + # @!attribute [rw] serialized_record_batch + # @return [::String] + # IPC-serialized Arrow RecordBatch. + # @!attribute [rw] row_count + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # [Deprecated] The count of rows in `serialized_record_batch`. + # Please use the format-independent ReadRowsResponse.row_count instead. + class ArrowRecordBatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains options specific to Arrow Serialization. + # @!attribute [rw] buffer_compression + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions::CompressionCodec] + # The compression codec to use for Arrow buffers in serialized record + # batches. + # @!attribute [rw] picos_timestamp_precision + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions::PicosTimestampPrecision] + # Optional. Set timestamp precision option. If not set, the default precision + # is microseconds. + class ArrowSerializationOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Compression codec's supported by Arrow. + module CompressionCodec + # If unspecified no compression will be used. + COMPRESSION_UNSPECIFIED = 0 + + # LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) + LZ4_FRAME = 1 + + # Zstandard compression. + ZSTD = 2 + end + + # The precision of the timestamp value in the Avro message. This precision + # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. + module PicosTimestampPrecision + # Unspecified timestamp precision. The default precision is microseconds. + PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 + + # Timestamp values returned by Read API will be truncated to microsecond + # level precision. The value will be encoded as Arrow TIMESTAMP type in a + # 64 bit integer. + TIMESTAMP_PRECISION_MICROS = 1 + + # Timestamp values returned by Read API will be truncated to nanosecond + # level precision. The value will be encoded as Arrow TIMESTAMP type in a + # 64 bit integer. + TIMESTAMP_PRECISION_NANOS = 2 + + # Read API will return full precision picosecond value. The value will be + # encoded as a string which conforms to ISO 8601 format. + TIMESTAMP_PRECISION_PICOS = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb new file mode 100644 index 000000000000..8d583439b10a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + # Avro schema. + # @!attribute [rw] schema + # @return [::String] + # Json serialized schema, as described at + # https://avro.apache.org/docs/1.8.1/spec.html. + class AvroSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Avro rows. + # @!attribute [rw] serialized_binary_rows + # @return [::String] + # Binary serialized rows in a block. + # @!attribute [rw] row_count + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # [Deprecated] The count of rows in the returning block. + # Please use the format-independent ReadRowsResponse.row_count instead. + class AvroRows + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains options specific to Avro Serialization. + # @!attribute [rw] enable_display_name_attribute + # @return [::Boolean] + # Enable displayName attribute in Avro schema. + # + # The Avro specification requires field names to be alphanumeric. By + # default, in cases when column names do not conform to these requirements + # (e.g. non-ascii unicode codepoints) and Avro is requested as an output + # format, the CreateReadSession call will fail. + # + # Setting this field to true, populates avro field names with a placeholder + # value and populates a "displayName" attribute for every avro field with the + # original column name. + # @!attribute [rw] picos_timestamp_precision + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions::PicosTimestampPrecision] + # Optional. Set timestamp precision option. If not set, the default precision + # is microseconds. + class AvroSerializationOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The precision of the timestamp value in the Avro message. This precision + # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. + module PicosTimestampPrecision + # Unspecified timestamp precision. The default precision is microseconds. + PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 + + # Timestamp values returned by Read API will be truncated to microsecond + # level precision. The value will be encoded as Avro TIMESTAMP type in a + # 64 bit integer. + TIMESTAMP_PRECISION_MICROS = 1 + + # Timestamp values returned by Read API will be truncated to nanosecond + # level precision. The value will be encoded as Avro TIMESTAMP type in a + # 64 bit integer. + TIMESTAMP_PRECISION_NANOS = 2 + + # Read API will return full precision picosecond value. The value will be + # encoded as a string which conforms to ISO 8601 format. + TIMESTAMP_PRECISION_PICOS = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb new file mode 100644 index 000000000000..eb0828eb038c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + # ProtoSchema describes the schema of the serialized protocol buffer data rows. + # @!attribute [rw] proto_descriptor + # @return [::Google::Protobuf::DescriptorProto] + # Descriptor for input message. The provided descriptor must be self + # contained, such that data rows sent can be fully decoded using only the + # single descriptor. For data rows that are compositions of multiple + # independent messages, this means the descriptor may need to be transformed + # to only use nested types: + # https://developers.google.com/protocol-buffers/docs/proto#nested + # + # For additional information for how proto types and values map onto BigQuery + # see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + class ProtoSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] serialized_rows + # @return [::Array<::String>] + # A sequence of rows serialized as a Protocol Buffer. + # + # See https://developers.google.com/protocol-buffers/docs/overview for more + # information on deserializing this field. + class ProtoRows + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb new file mode 100644 index 000000000000..01b68119dc9a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb @@ -0,0 +1,697 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + # Request message for `CreateReadSession`. + # @!attribute [rw] parent + # @return [::String] + # Required. The request project that owns the session, in the form of + # `projects/{project_id}`. + # @!attribute [rw] read_session + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession] + # Required. Session to be created. + # @!attribute [rw] max_stream_count + # @return [::Integer] + # Max initial number of streams. If unset or zero, the server will + # provide a value of streams so as to produce reasonable throughput. Must be + # non-negative. The number of streams may be lower than the requested number, + # depending on the amount parallelism that is reasonable for the table. + # There is a default system max limit of 1,000. + # + # This must be greater than or equal to preferred_min_stream_count. + # Typically, clients should either leave this unset to let the system to + # determine an upper bound OR set this a size for the maximum "units of work" + # it can gracefully handle. + # @!attribute [rw] preferred_min_stream_count + # @return [::Integer] + # The minimum preferred stream count. This parameter can be used to inform + # the service that there is a desired lower bound on the number of streams. + # This is typically a target parallelism of the client (e.g. a Spark + # cluster with N-workers would set this to a low multiple of N to ensure + # good cluster utilization). + # + # The system will make a best effort to provide at least this number of + # streams, but in some cases might provide less. + class CreateReadSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `ReadRows`. + # @!attribute [rw] read_stream + # @return [::String] + # Required. Stream to read rows from. + # @!attribute [rw] offset + # @return [::Integer] + # The offset requested must be less than the last row read from Read. + # Requesting a larger offset is undefined. If not specified, start reading + # from offset zero. + # @!attribute [rw] arrow_serialization_options + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions] + # Optional. Options specific to the Apache Arrow output format. + # + # This feature is not yet available. + class ReadRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information on if the current connection is being throttled. + # @!attribute [rw] throttle_percent + # @return [::Integer] + # How much this connection is being throttled. Zero means no throttling, + # 100 means fully throttled. + class ThrottleState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Estimated stream statistics for a given read Stream. + # @!attribute [rw] progress + # @return [::Google::Cloud::Bigquery::Storage::V1::StreamStats::Progress] + # Represents the progress of the current stream. + class StreamStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] at_response_start + # @return [::Float] + # The fraction of rows assigned to the stream that have been processed by + # the server so far, not including the rows in the current response + # message. + # + # This value, along with `at_response_end`, can be used to interpolate + # the progress made as the rows in the message are being processed using + # the following formula: `at_response_start + (at_response_end - + # at_response_start) * rows_processed_from_response / rows_in_response`. + # + # Note that if a filter is provided, the `at_response_end` value of the + # previous response may not necessarily be equal to the + # `at_response_start` value of the current response. + # @!attribute [rw] at_response_end + # @return [::Float] + # Similar to `at_response_start`, except that this value includes the + # rows in the current response. + class Progress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response from calling `ReadRows` may include row data, progress and + # throttling information. + # @!attribute [rw] avro_rows + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroRows] + # Serialized row data in AVRO format. + # + # Note: The following fields are mutually exclusive: `avro_rows`, `arrow_record_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] arrow_record_batch + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowRecordBatch] + # Serialized row data in Arrow RecordBatch format. + # + # Note: The following fields are mutually exclusive: `arrow_record_batch`, `avro_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] row_count + # @return [::Integer] + # Number of serialized rows in the rows block. + # @!attribute [rw] stats + # @return [::Google::Cloud::Bigquery::Storage::V1::StreamStats] + # Statistics for the stream. + # @!attribute [rw] throttle_state + # @return [::Google::Cloud::Bigquery::Storage::V1::ThrottleState] + # Throttling state. If unset, the latest response still describes + # the current throttling status. + # @!attribute [r] avro_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSchema] + # Output only. Avro schema. + # + # Note: The following fields are mutually exclusive: `avro_schema`, `arrow_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] arrow_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] + # Output only. Arrow schema. + # + # Note: The following fields are mutually exclusive: `arrow_schema`, `avro_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uncompressed_byte_size + # @return [::Integer] + # 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. + # @!attribute [r] total_estimated_row_count + # @return [::Integer] + # Output only. The total estimated number of rows in the query results. + # Only populated when reading data from a BigQuery job. + # + # This feature is not yet available. + class ReadRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `SplitReadStream`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the stream to split. + # @!attribute [rw] fraction + # @return [::Float] + # A value in the range (0.0, 1.0) that specifies the fractional point at + # which the original stream should be split. The actual split point is + # evaluated on pre-filtered rows, so if a filter is provided, then there is + # no guarantee that the division of the rows between the new child streams + # will be proportional to this fractional value. Additionally, because the + # server-side unit for assigning data is collections of rows, this fraction + # will always map to a data storage boundary on the server side. + class SplitReadStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `SplitReadStream`. + # @!attribute [rw] primary_stream + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadStream] + # Primary stream, which contains the beginning portion of + # |original_stream|. An empty value indicates that the original stream can no + # longer be split. + # @!attribute [rw] remainder_stream + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadStream] + # Remainder stream, which contains the tail of |original_stream|. An empty + # value indicates that the original stream can no longer be split. + class SplitReadStreamResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `CreateWriteStream`. + # @!attribute [rw] parent + # @return [::String] + # Required. Reference to the table to which the stream belongs, in the format + # of `projects/{project}/datasets/{dataset}/tables/{table}`. + # @!attribute [rw] write_stream + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # Required. Stream to be created. + class CreateWriteStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `AppendRows`. + # + # Because AppendRows is a bidirectional streaming RPC, certain parts of the + # AppendRowsRequest need only be specified for the first request before + # switching table destinations. You can also switch table destinations within + # the same connection for the default stream. + # + # The size of a single AppendRowsRequest must be less than 20 MB in size. + # Requests larger than this return an error, typically `INVALID_ARGUMENT`. + # @!attribute [rw] write_stream + # @return [::String] + # Required. The write_stream identifies the append operation. It must be + # provided in the following scenarios: + # + # * In the first request to an AppendRows connection. + # + # * In all subsequent requests to an AppendRows connection, if you use the + # same connection to write to multiple tables or change the input schema for + # default streams. + # + # For explicitly created write streams, the format is: + # + # * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + # + # For the special default stream, the format is: + # + # * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + # + # An example of a possible sequence of requests with write_stream fields + # within a single connection: + # + # * r1: \\{write_stream: stream_name_1} + # + # * r2: \\{write_stream: /*omit*/} + # + # * r3: \\{write_stream: /*omit*/} + # + # * r4: \\{write_stream: stream_name_2} + # + # * r5: \\{write_stream: stream_name_2} + # + # The destination changed in request_4, so the write_stream field must be + # populated in all subsequent requests in this stream. + # @!attribute [rw] offset + # @return [::Google::Protobuf::Int64Value] + # If present, the write is only performed if the next append offset is same + # as the provided value. If not present, the write is performed at the + # current end of stream. Specifying a value for this field is not allowed + # when calling AppendRows for the '_default' stream. + # @!attribute [rw] proto_rows + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData] + # Rows in proto format. + # + # Note: The following fields are mutually exclusive: `proto_rows`, `arrow_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] arrow_rows + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData] + # Rows in arrow format. + # + # Note: The following fields are mutually exclusive: `arrow_rows`, `proto_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] trace_id + # @return [::String] + # Id set by client to annotate its identity. Only initial request setting is + # respected. + # @!attribute [rw] missing_value_interpretations + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation}] + # A map to indicate how to interpret missing value for some fields. Missing + # values are fields present in user schema but missing in rows. The key is + # the field name. The value is the interpretation of missing values for the + # field. + # + # For example, a map \\{'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + # missing values in field foo are interpreted as NULL, all missing values in + # field bar are interpreted as the default value of field bar in table + # schema. + # + # If a field is not in this map and has missing values, the missing values + # in this field are interpreted as NULL. + # + # This field only applies to the current request, it won't affect other + # requests on the connection. + # + # Currently, field name can only be top-level column name, can't be a struct + # field path like 'foo.bar'. + # @!attribute [rw] default_missing_value_interpretation + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation] + # Optional. Default missing value interpretation for all columns in the + # table. When a value is specified on an `AppendRowsRequest`, it is applied + # to all requests from that point forward, until a subsequent + # `AppendRowsRequest` sets it to a different value. + # `missing_value_interpretation` can override + # `default_missing_value_interpretation`. For example, if you want to write + # `NULL` instead of using default values for some columns, you can set + # `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + # time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + # @!attribute [rw] client_stats + # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats] + # Optional. Stats and telemetry data gathered on the client side. + class AppendRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Arrow schema and data. + # @!attribute [rw] writer_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] + # Optional. Arrow Schema used to serialize the data. + # @!attribute [rw] rows + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowRecordBatch] + # Required. Serialized row data in Arrow format. + class ArrowData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ProtoData contains the data rows and schema when constructing append + # requests. + # @!attribute [rw] writer_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::ProtoSchema] + # Optional. The protocol buffer schema used to serialize the data. Provide + # this value whenever: + # + # * You send the first request of an RPC connection. + # + # * You change the input schema. + # + # * You specify a new destination table. + # @!attribute [rw] rows + # @return [::Google::Cloud::Bigquery::Storage::V1::ProtoRows] + # Required. Serialized row data in protobuf message format. + # Currently, the backend expects the serialized rows to adhere to + # proto2 semantics when appending rows, particularly with respect to + # how default values are encoded. + class ProtoData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation] + class MissingValueInterpretationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An enum to indicate how to interpret missing values of fields that are + # present in user schema but missing in rows. A missing value can represent a + # NULL or a column default value defined in BigQuery table schema. + module MissingValueInterpretation + # Invalid missing value interpretation. Requests with this value will be + # rejected. + MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0 + + # Missing value is interpreted as NULL. + NULL_VALUE = 1 + + # Missing value is interpreted as column default value if declared in the + # table schema, NULL otherwise. + DEFAULT_VALUE = 2 + end + end + + # Response message for `AppendRows`. + # @!attribute [rw] append_result + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse::AppendResult] + # Result if the append is successful. + # + # Note: The following fields are mutually exclusive: `append_result`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Error returned when problems were encountered. If present, + # it indicates rows were not accepted into the system. + # Users can retry or continue with other append requests within the + # same connection. + # + # Additional information about error signalling: + # + # ALREADY_EXISTS: Happens when an append specified an offset, and the + # backend already has received data at this offset. Typically encountered + # in retry scenarios, and can be ignored. + # + # OUT_OF_RANGE: Returned when the specified offset in the stream is beyond + # the current end of the stream. + # + # INVALID_ARGUMENT: Indicates a malformed request or data. + # + # ABORTED: Request processing is aborted because of prior failures. The + # request can be retried if previous failure is addressed. + # + # INTERNAL: Indicates server side error(s) that can be retried. + # + # Note: The following fields are mutually exclusive: `error`, `append_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] updated_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::TableSchema] + # If backend detects a schema update, pass it to user so that user can + # use it to input new type of message. It will be empty when no schema + # updates have occurred. + # @!attribute [rw] row_errors + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::RowError>] + # If a request failed due to corrupted rows, no rows in the batch will be + # appended. The API will return row level error info, so that the caller can + # remove the bad rows and retry the request. + # @!attribute [rw] write_stream + # @return [::String] + # The target of the append operation. Matches the write_stream in the + # corresponding request. + class AppendRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # AppendResult is returned for successful append requests. + # @!attribute [rw] offset + # @return [::Google::Protobuf::Int64Value] + # The row offset at which the last append occurred. The offset will not be + # set if appending using default streams. + class AppendResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for `GetWriteStreamRequest`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the stream to get, in the form of + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStreamView] + # Indicates whether to get full or partial view of the WriteStream. If + # not set, view returned will be basic. + class GetWriteStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `BatchCommitWriteStreams`. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent table that all the streams should belong to, in the form + # of `projects/{project}/datasets/{dataset}/tables/{table}`. + # @!attribute [rw] write_streams + # @return [::Array<::String>] + # Required. The group of streams that will be committed atomically. + class BatchCommitWriteStreamsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `BatchCommitWriteStreams`. + # @!attribute [rw] commit_time + # @return [::Google::Protobuf::Timestamp] + # The time at which streams were committed in microseconds granularity. + # This field will only exist when there are no stream errors. + # **Note** if this field is not set, it means the commit was not successful. + # @!attribute [rw] stream_errors + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::StorageError>] + # Stream level error if commit failed. Only streams with error will be in + # the list. + # If empty, there is no error and all streams are committed successfully. + # If non empty, certain streams have errors and ZERO stream is committed due + # to atomicity guarantee. + class BatchCommitWriteStreamsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for invoking `FinalizeWriteStream`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the stream to finalize, in the form of + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + class FinalizeWriteStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `FinalizeWriteStream`. + # @!attribute [rw] row_count + # @return [::Integer] + # Number of rows in the finalized stream. + class FinalizeWriteStreamResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `FlushRows`. + # @!attribute [rw] write_stream + # @return [::String] + # Required. The stream that is the target of the flush operation. + # @!attribute [rw] offset + # @return [::Google::Protobuf::Int64Value] + # Ending offset of the flush operation. Rows before this offset(including + # this offset) will be flushed. + class FlushRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Respond message for `FlushRows`. + # @!attribute [rw] offset + # @return [::Integer] + # The rows before this offset (including this offset) are flushed. + class FlushRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured custom BigQuery Storage error message. The error can be attached + # as error details in the returned rpc Status. In particular, the use of error + # codes allows more structured error handling, and reduces the need to evaluate + # unstructured error text strings. + # @!attribute [rw] code + # @return [::Google::Cloud::Bigquery::Storage::V1::StorageError::StorageErrorCode] + # BigQuery Storage specific error code. + # @!attribute [rw] entity + # @return [::String] + # Name of the failed entity. + # @!attribute [rw] error_message + # @return [::String] + # Message that describes the error. + class StorageError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error code for `StorageError`. + module StorageErrorCode + # Default error. + STORAGE_ERROR_CODE_UNSPECIFIED = 0 + + # Table is not found in the system. + TABLE_NOT_FOUND = 1 + + # Stream is already committed. + STREAM_ALREADY_COMMITTED = 2 + + # Stream is not found. + STREAM_NOT_FOUND = 3 + + # Invalid Stream type. + # For example, you try to commit a stream that is not pending. + INVALID_STREAM_TYPE = 4 + + # Invalid Stream state. + # For example, you try to commit a stream that is not finalized or is + # garbaged. + INVALID_STREAM_STATE = 5 + + # Stream is finalized. + STREAM_FINALIZED = 6 + + # There is a schema mismatch and it is caused by user schema has extra + # field than bigquery schema. + SCHEMA_MISMATCH_EXTRA_FIELDS = 7 + + # Offset already exists. + OFFSET_ALREADY_EXISTS = 8 + + # Offset out of range. + OFFSET_OUT_OF_RANGE = 9 + + # Customer-managed encryption key (CMEK) not provided for CMEK-enabled + # data. + CMEK_NOT_PROVIDED = 10 + + # Customer-managed encryption key (CMEK) was incorrectly provided. + INVALID_CMEK_PROVIDED = 11 + + # There is an encryption error while using customer-managed encryption key. + CMEK_ENCRYPTION_ERROR = 12 + + # Key Management Service (KMS) service returned an error, which can be + # retried. + KMS_SERVICE_ERROR = 13 + + # Permission denied while using customer-managed encryption key. + KMS_PERMISSION_DENIED = 14 + end + end + + # The message that presents row level error info in a request. + # @!attribute [rw] index + # @return [::Integer] + # Index of the malformed row in the request. + # @!attribute [rw] code + # @return [::Google::Cloud::Bigquery::Storage::V1::RowError::RowErrorCode] + # Structured error reason for a row error. + # @!attribute [rw] message + # @return [::String] + # Description of the issue encountered when processing the row. + class RowError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error code for `RowError`. + module RowErrorCode + # Default error. + ROW_ERROR_CODE_UNSPECIFIED = 0 + + # One or more fields in the row has errors. + FIELDS_ERROR = 1 + end + end + + # Stats and telemetry data gathered on the client side about requests + # being sent to the BigQuery Storage service, for internal use only. + # @!attribute [rw] request_stats + # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats::RequestStats] + # Optional. Per-request stats. + # @!attribute [rw] window_stats + # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats::WindowStats] + # Optional. Windowed stats. + class ClientStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stats and telemetry data gathered on the client side about a single + # request. + # @!attribute [rw] send_time_millis + # @return [::Integer] + # Optional. Timestamp indicating when the request was sent over the + # network, expressed in epoch milliseconds. + # @!attribute [rw] queued_requests_count + # @return [::Integer] + # Optional. Number of pending requests at the moment this request was sent. + # This includes requests waiting to be sent, and those that are inflight. + class RequestStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregate connection metrics over a window interval. + # @!attribute [rw] max_response_latency_millis + # @return [::Integer] + # Optional. The maximum response latency observed in the window, expressed + # in milliseconds. + # @!attribute [rw] avg_response_latency_millis + # @return [::Integer] + # Optional. The average response latency observed in the window, expressed + # in milliseconds. + # @!attribute [rw] longest_wait_no_response_millis + # @return [::Integer] + # Optional. The longest time spent waiting without receiving a response in + # the window. This could exceed max_response_latency_millis because the + # latter is evaluated only when a response is received. Expressed in + # milliseconds. + # @!attribute [rw] requests_sent_count + # @return [::Integer] + # Optional. How many requests were sent in the window. + # @!attribute [rw] responses_received_count + # @return [::Integer] + # Optional. How many responses were received in the window. + # @!attribute [rw] bytes_sent_count + # @return [::Integer] + # Optional. How many bytes were sent in the window. + # @!attribute [rw] window_start_time_epoch_millis + # @return [::Integer] + # Optional. Start time of the window interval for which these stats are + # aggregated, expressed in epoch milliseconds. + # @!attribute [rw] window_millis + # @return [::Integer] + # Optional. Duration of the window interval for which these stats are + # aggregated, expressed in milliseconds. + class WindowStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb new file mode 100644 index 000000000000..a9d8230c0a6c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + # Information about the ReadSession. + # @!attribute [r] name + # @return [::String] + # Output only. Unique identifier for the session, in the form + # `projects/{project_id}/locations/{location}/sessions/{session_id}`. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which the session becomes invalid. After this time, + # subsequent requests to read this Session will return errors. The + # expire_time is automatically assigned and currently cannot be specified or + # updated. + # @!attribute [rw] data_format + # @return [::Google::Cloud::Bigquery::Storage::V1::DataFormat] + # Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + # supported. + # @!attribute [r] avro_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSchema] + # Output only. Avro schema. + # + # Note: The following fields are mutually exclusive: `avro_schema`, `arrow_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] arrow_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] + # Output only. Arrow schema. + # + # Note: The following fields are mutually exclusive: `arrow_schema`, `avro_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] table + # @return [::String] + # Immutable. Table that this ReadSession is reading from, in the form + # `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + # @!attribute [rw] table_modifiers + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableModifiers] + # Optional. Any modifiers which are applied when reading from the specified + # table. + # @!attribute [rw] read_options + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions] + # Optional. Read options for this session (e.g. column selection, filters). + # @!attribute [r] streams + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::ReadStream>] + # Output only. A list of streams created with the session. + # + # At least one stream is created with the session. In the future, larger + # request_stream_count values *may* result in this list being unpopulated, + # in that case, the user will need to use a List method to get the streams + # instead, which is not yet available. + # @!attribute [r] estimated_total_bytes_scanned + # @return [::Integer] + # Output only. An estimate on the number of bytes this session will scan when + # all streams are completely consumed. This estimate is based on + # metadata from the table which might be incomplete or stale. + # @!attribute [r] estimated_total_physical_file_size + # @return [::Integer] + # Output only. A pre-projected estimate of the total physical size of files + # (in bytes) that this session will scan when all streams are consumed. This + # estimate is independent of the selected columns and can be based on + # incomplete or stale metadata from the table. This field is only set for + # BigLake tables. + # @!attribute [r] estimated_row_count + # @return [::Integer] + # Output only. An estimate on the number of rows present in this session's + # streams. This estimate is based on metadata from the table which might be + # incomplete or stale. + # @!attribute [rw] trace_id + # @return [::String] + # Optional. ID set by client to annotate a session identity. This does not + # need to be strictly unique, but instead the same ID should be used to group + # logically connected sessions (e.g. All using the same ID for all sessions + # needed to complete a Spark SQL query is reasonable). + # + # Maximum length is 256 bytes. + class ReadSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional attributes when reading a table. + # @!attribute [rw] snapshot_time + # @return [::Google::Protobuf::Timestamp] + # The snapshot time of the table. If not set, interpreted as now. + class TableModifiers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options dictating how we read a table. + # @!attribute [rw] selected_fields + # @return [::Array<::String>] + # 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. + # + # Nested fields -- the child elements of a STRUCT field -- can be selected + # individually using their fully-qualified names, and will be returned as + # record fields containing only the selected nested fields. If a STRUCT + # field is specified in the selected fields list, all of the child elements + # will be returned. + # + # As an example, consider a table with the following schema: + # + # { + # "name": "struct_field", + # "type": "RECORD", + # "mode": "NULLABLE", + # "fields": [ + # { + # "name": "string_field1", + # "type": "STRING", + # . "mode": "NULLABLE" + # }, + # { + # "name": "string_field2", + # "type": "STRING", + # "mode": "NULLABLE" + # } + # ] + # } + # + # Specifying "struct_field" in the selected fields list will result in a + # read session schema with the following logical structure: + # + # struct_field { + # string_field1 + # string_field2 + # } + # + # Specifying "struct_field.string_field1" in the selected fields list will + # result in a read session schema with the following logical structure: + # + # struct_field { + # string_field1 + # } + # + # The order of the fields in the read session schema is derived from the + # table schema and does not correspond to the order in which the fields are + # specified in this list. + # @!attribute [rw] row_restriction + # @return [::String] + # SQL text filtering statement, similar to a WHERE clause in a query. + # Aggregates are not supported. + # + # Examples: "int_field > 5" + # "date_field = CAST('2014-9-27' as DATE)" + # "nullable_field is not NULL" + # "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + # "numeric_field BETWEEN 1.0 AND 5.0" + # + # Restricted to a maximum length for 1 MB. + # @!attribute [rw] arrow_serialization_options + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions] + # Optional. Options specific to the Apache Arrow output format. + # + # Note: The following fields are mutually exclusive: `arrow_serialization_options`, `avro_serialization_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] avro_serialization_options + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions] + # Optional. Options specific to the Apache Avro output format + # + # Note: The following fields are mutually exclusive: `avro_serialization_options`, `arrow_serialization_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sample_percentage + # @return [::Float] + # Optional. Specifies a table sampling percentage. Specifically, the query + # planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + # sampling percentage is applied at the data block granularity. It will + # randomly choose for each data block whether to read the rows in that data + # block. For more details, see + # https://cloud.google.com/bigquery/docs/table-sampling) + # @!attribute [rw] response_compression_codec + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions::ResponseCompressionCodec] + # Optional. Set response_compression_codec when creating a read session to + # enable application-level compression of ReadRows responses. + class TableReadOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # 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. + module ResponseCompressionCodec + # Default is no compression. + RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0 + + # Use raw LZ4 compression. + RESPONSE_COMPRESSION_CODEC_LZ4 = 2 + end + end + end + + # Information about a single stream that gets data out of the storage system. + # Most of the information about `ReadStream` instances is aggregated, making + # `ReadStream` lightweight. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the stream, in the form + # `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + class ReadStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about a single stream that gets data inside the storage system. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the stream, in the form + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream::Type] + # Immutable. Type of the stream. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time of the stream. For the _default stream, this is + # the creation_time of the table. + # @!attribute [r] commit_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Commit time of the stream. + # If a stream is of `COMMITTED` type, then it will have a commit_time same as + # `create_time`. If the stream is of `PENDING` type, empty commit_time + # means it is not committed. + # @!attribute [r] table_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::TableSchema] + # Output only. The schema of the destination table. It is only returned in + # `CreateWriteStream` response. Caller should generate data that's + # compatible with this schema to send in initial `AppendRowsRequest`. + # The table schema could go out of date during the life time of the stream. + # @!attribute [rw] write_mode + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream::WriteMode] + # Immutable. Mode of the stream. + # @!attribute [r] location + # @return [::String] + # Output only. The geographic location where the stream's dataset resides. + # See https://cloud.google.com/bigquery/docs/locations for supported + # locations. + class WriteStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type enum of the stream. + module Type + # Unknown type. + TYPE_UNSPECIFIED = 0 + + # Data will commit automatically and appear as soon as the write is + # acknowledged. + COMMITTED = 1 + + # Data is invisible until the stream is committed. + PENDING = 2 + + # Data is only visible up to the offset to which it was flushed. + BUFFERED = 3 + end + + # Mode enum of the stream. + module WriteMode + # Unknown type. + WRITE_MODE_UNSPECIFIED = 0 + + # Insert new records into the table. + # It is the default value if customers do not specify it. + INSERT = 1 + end + end + + # Data format for input or output data. + module DataFormat + # Data format is unspecified. + DATA_FORMAT_UNSPECIFIED = 0 + + # Avro is a standard open source row based file format. + # See https://avro.apache.org/ for more details. + AVRO = 1 + + # Arrow is a standard open source column-based message format. + # See https://arrow.apache.org/ for more details. + ARROW = 2 + end + + # WriteStreamView is a view enum that controls what details about a write + # stream should be returned. + module WriteStreamView + # The default / unset value. + WRITE_STREAM_VIEW_UNSPECIFIED = 0 + + # The BASIC projection returns basic metadata about a write stream. The + # basic view does not include schema information. This is the default view + # returned by GetWriteStream. + BASIC = 1 + + # The FULL projection returns all available write stream metadata, including + # the schema. CreateWriteStream returns the full projection of write stream + # metadata. + FULL = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb new file mode 100644 index 000000000000..a014f79dc9d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + # Schema of a table. This schema is a subset of + # google.cloud.bigquery.v2.TableSchema containing information necessary to + # generate valid message to write to BigQuery. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>] + # Describes the fields in a table. + class TableSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # TableFieldSchema defines a single field/column within a table schema. + # @!attribute [rw] name + # @return [::String] + # 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. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] + # Required. The field data type. + # @!attribute [rw] mode + # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Mode] + # Optional. The field mode. The default value is NULLABLE. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>] + # Optional. Describes the nested schema fields if the type property is set to + # STRUCT. + # @!attribute [rw] description + # @return [::String] + # Optional. The field description. The maximum length is 1,024 characters. + # @!attribute [rw] max_length + # @return [::Integer] + # Optional. Maximum length of values of this field for STRINGS or BYTES. + # + # If max_length is not specified, no maximum length constraint is imposed + # on this field. + # + # If type = "STRING", then max_length represents the maximum UTF-8 + # length of strings in this field. + # + # If type = "BYTES", then max_length represents the maximum number of + # bytes in this field. + # + # It is invalid to set this field if type is not "STRING" or "BYTES". + # @!attribute [rw] precision + # @return [::Integer] + # Optional. Precision (maximum number of total digits in base 10) and scale + # (maximum number of digits in the fractional part in base 10) constraints + # for values of this field for NUMERIC or BIGNUMERIC. + # + # It is invalid to set precision or scale if type is not "NUMERIC" or + # "BIGNUMERIC". + # + # If precision and scale are not specified, no value range constraint is + # imposed on this field insofar as values are permitted by the type. + # + # Values of this NUMERIC or BIGNUMERIC field must be in this range when: + # + # * Precision (P) and scale (S) are specified: + # [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + # * Precision (P) is specified but not scale (and thus scale is + # interpreted to be equal to zero): + # [-10^P + 1, 10^P - 1]. + # + # Acceptable values for precision and scale if both are specified: + # + # * If type = "NUMERIC": + # 1 <= precision - scale <= 29 and 0 <= scale <= 9. + # * If type = "BIGNUMERIC": + # 1 <= precision - scale <= 38 and 0 <= scale <= 38. + # + # Acceptable values for precision if only precision is specified but not + # scale (and thus scale is interpreted to be equal to zero): + # + # * If type = "NUMERIC": 1 <= precision <= 29. + # * If type = "BIGNUMERIC": 1 <= precision <= 38. + # + # If scale is specified but not precision, then it is invalid. + # @!attribute [rw] scale + # @return [::Integer] + # Optional. See documentation for precision. + # @!attribute [rw] default_value_expression + # @return [::String] + # Optional. A SQL expression to specify the [default value] + # (https://cloud.google.com/bigquery/docs/default-values) for this field. + # @!attribute [rw] timestamp_precision + # @return [::Google::Protobuf::Int64Value] + # Optional. Precision (maximum number of total digits in base 10) for seconds + # of TIMESTAMP type. + # + # Possible values include: + # + # * 6 (Default, for TIMESTAMP type with microsecond precision) + # * 12 (For TIMESTAMP type with picosecond precision) + # @!attribute [rw] range_element_type + # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::FieldElementType] + # 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 + class TableFieldSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the type of a field element. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] + # Required. The type of a field element. + class FieldElementType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module Type + # Illegal value + TYPE_UNSPECIFIED = 0 + + # 64K, UTF8 + STRING = 1 + + # 64-bit signed + INT64 = 2 + + # 64-bit IEEE floating point + DOUBLE = 3 + + # Aggregate type + STRUCT = 4 + + # 64K, Binary + BYTES = 5 + + # 2-valued + BOOL = 6 + + # 64-bit signed usec since UTC epoch + TIMESTAMP = 7 + + # Civil date - Year, Month, Day + DATE = 8 + + # Civil time - Hour, Minute, Second, Microseconds + TIME = 9 + + # Combination of civil date and civil time + DATETIME = 10 + + # Geography object + GEOGRAPHY = 11 + + # Numeric value + NUMERIC = 12 + + # BigNumeric value + BIGNUMERIC = 13 + + # Interval + INTERVAL = 14 + + # JSON, String + JSON = 15 + + # RANGE + RANGE = 16 + end + + module Mode + # Illegal value + MODE_UNSPECIFIED = 0 + + NULLABLE = 1 + + REQUIRED = 2 + + REPEATED = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module 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); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # 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 := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(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": , + # "lastName": + # } + # + # 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" + # } + # @!attribute [rw] type_url + # @return [::String] + # 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. 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. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module 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". + # @!attribute [rw] seconds + # @return [::Integer] + # 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 + # @!attribute [rw] nanos + # @return [::Integer] + # 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. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..e58202461f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,128 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module 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 Java `Instant.now()`. + # + # 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() + # + # # 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://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must + # be between -315576000000 and 315576000000 inclusive (which corresponds to + # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). + # @!attribute [rw] nanos + # @return [::Integer] + # 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. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # Wrapper message for `double`. + # + # 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. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # 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. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # 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. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # 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. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # 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. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # 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. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # 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. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # 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. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # 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. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # 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). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # 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. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile new file mode 100644 index 000000000000..3ec30152a26d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-storage-v1", path: "../" +else + gem "google-cloud-bigquery-storage-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb new file mode 100644 index 000000000000..97d4edfc8251 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the create_read_session call in the BigQueryRead service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session. +# +def create_read_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new + + # Call the create_read_session method. + result = client.create_read_session request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession. + p result +end +# [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb new file mode 100644 index 000000000000..a10ecf50c1c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the read_rows call in the BigQueryRead service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows. +# +def read_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new + + # Call the read_rows method to start streaming. + output = client.read_rows request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse + output.each do |current_response| + p current_response + end +end +# [END bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb new file mode 100644 index 000000000000..f0a8033cec49 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the split_read_stream call in the BigQueryRead service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream. +# +def split_read_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new + + # Call the split_read_stream method. + result = client.split_read_stream request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse. + p result +end +# [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb new file mode 100644 index 000000000000..291fbc8d14ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the append_rows call in the BigQueryWrite service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows. +# +def append_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the append_rows method to start streaming. + output = client.append_rows input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new + input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse + output.each do |current_response| + p current_response + end +end +# [END bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb new file mode 100644 index 000000000000..c7e6925c2f99 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the batch_commit_write_streams call in the BigQueryWrite service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams. +# +def batch_commit_write_streams + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new + + # Call the batch_commit_write_streams method. + result = client.batch_commit_write_streams request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb new file mode 100644 index 000000000000..ad3883cf57b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the create_write_stream call in the BigQueryWrite service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream. +# +def create_write_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new + + # Call the create_write_stream method. + result = client.create_write_stream request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb new file mode 100644 index 000000000000..a8f857e48124 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the finalize_write_stream call in the BigQueryWrite service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream. +# +def finalize_write_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new + + # Call the finalize_write_stream method. + result = client.finalize_write_stream request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb new file mode 100644 index 000000000000..47533a19a759 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the flush_rows call in the BigQueryWrite service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows. +# +def flush_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new + + # Call the flush_rows method. + result = client.flush_rows request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb new file mode 100644 index 000000000000..a30ea12d7684 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the get_write_stream call in the BigQueryWrite service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream. +# +def get_write_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new + + # Call the get_write_stream method. + result = client.get_write_stream request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json new file mode 100644 index 000000000000..b6c6f418de1d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json @@ -0,0 +1,375 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-storage-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.storage.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync", + "title": "Snippet for the create_read_session call in the BigQueryRead service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session.", + "file": "big_query_read/create_read_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_read_session", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::ReadSession", + "client": { + "short_name": "BigQueryRead::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" + }, + "method": { + "short_name": "CreateReadSession", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.CreateReadSession", + "service": { + "short_name": "BigQueryRead", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync", + "title": "Snippet for the read_rows call in the BigQueryRead service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows.", + "file": "big_query_read/read_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "read_rows", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse", + "client": { + "short_name": "BigQueryRead::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" + }, + "method": { + "short_name": "ReadRows", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.ReadRows", + "service": { + "short_name": "BigQueryRead", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync", + "title": "Snippet for the split_read_stream call in the BigQueryRead service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream.", + "file": "big_query_read/split_read_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "split_read_stream", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse", + "client": { + "short_name": "BigQueryRead::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" + }, + "method": { + "short_name": "SplitReadStream", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.SplitReadStream", + "service": { + "short_name": "BigQueryRead", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync", + "title": "Snippet for the create_write_stream call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream.", + "file": "big_query_write/create_write_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_write_stream", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::WriteStream", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "CreateWriteStream", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.CreateWriteStream", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync", + "title": "Snippet for the append_rows call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows.", + "file": "big_query_write/append_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "append_rows", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "AppendRows", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.AppendRows", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync", + "title": "Snippet for the get_write_stream call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream.", + "file": "big_query_write/get_write_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_write_stream", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::WriteStream", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "GetWriteStream", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.GetWriteStream", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync", + "title": "Snippet for the finalize_write_stream call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream.", + "file": "big_query_write/finalize_write_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "finalize_write_stream", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "FinalizeWriteStream", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.FinalizeWriteStream", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync", + "title": "Snippet for the batch_commit_write_streams call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams.", + "file": "big_query_write/batch_commit_write_streams.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_commit_write_streams", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "BatchCommitWriteStreams", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.BatchCommitWriteStreams", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync", + "title": "Snippet for the flush_rows call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows.", + "file": "big_query_write/flush_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "flush_rows", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "FlushRows", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.FlushRows", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb new file mode 100644 index 000000000000..87827e1ac024 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/storage/v1/big_query_read" + +class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_read_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.read_session_path project: "value0", location: "value1", session: "value2" + assert_equal "projects/value0/locations/value1/sessions/value2", path + end + end + + def test_read_stream_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.read_stream_path project: "value0", location: "value1", session: "value2", stream: "value3" + assert_equal "projects/value0/locations/value1/sessions/value2/streams/value3", path + end + end + + def test_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_path project: "value0", dataset: "value1", table: "value2" + assert_equal "projects/value0/datasets/value1/tables/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb new file mode 100644 index 000000000000..7f67d1586d09 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb @@ -0,0 +1,306 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/storage/v1/storage_pb" +require "google/cloud/bigquery/storage/v1/big_query_read" + +class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_read_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::ReadSession.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_session = {} + max_stream_count = 42 + preferred_min_stream_count = 42 + + create_read_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_read_session, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ReadSession), request["read_session"] + assert_equal 42, request["max_stream_count"] + assert_equal 42, request["preferred_min_stream_count"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_read_session_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_read_session({ parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_read_session parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_read_session ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new(parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_read_session({ parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_read_session(::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new(parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_read_session_client_stub.call_rpc_count + end + end + + def test_read_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + read_stream = "hello world" + offset = 42 + arrow_serialization_options = {} + + read_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :read_rows, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, request + assert_equal "hello world", request["read_stream"] + assert_equal 42, request["offset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions), request["arrow_serialization_options"] + assert_equal :arrow_serialization_options, request.output_format_serialization_options + refute_nil options + end + + Gapic::ServiceStub.stub :new, read_rows_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.read_rows({ read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + c.read_rows read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.read_rows ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.read_rows({ read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.read_rows(::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, read_rows_client_stub.call_rpc_count + end + end + + def test_split_read_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + fraction = 3.5 + + split_read_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :split_read_stream, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, request + assert_equal "hello world", request["name"] + assert_equal 3.5, request["fraction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, split_read_stream_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.split_read_stream({ name: name, fraction: fraction }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.split_read_stream name: name, fraction: fraction do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.split_read_stream ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new(name: name, fraction: fraction) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.split_read_stream({ name: name, fraction: fraction }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.split_read_stream(::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new(name: name, fraction: fraction), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, split_read_stream_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb new file mode 100644 index 000000000000..aeeebb7c4e2d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/storage/v1/big_query_write" + +class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_path project: "value0", dataset: "value1", table: "value2" + assert_equal "projects/value0/datasets/value1/tables/value2", path + end + end + + def test_write_stream_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.write_stream_path project: "value0", dataset: "value1", table: "value2", stream: "value3" + assert_equal "projects/value0/datasets/value1/tables/value2/streams/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb new file mode 100644 index 000000000000..1f6731d962f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb @@ -0,0 +1,503 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/storage/v1/storage_pb" +require "google/cloud/bigquery/storage/v1/big_query_write" + +class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_write_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::WriteStream.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + write_stream = {} + + create_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_write_stream, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::WriteStream), request["write_stream"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_write_stream_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_write_stream({ parent: parent, write_stream: write_stream }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_write_stream parent: parent, write_stream: write_stream do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_write_stream ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new(parent: parent, write_stream: write_stream) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_write_stream({ parent: parent, write_stream: write_stream }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_write_stream(::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new(parent: parent, write_stream: write_stream), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_write_stream_client_stub.call_rpc_count + end + end + + def test_append_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a bidi streaming method. + write_stream = "hello world" + offset = {} + proto_rows = {} + trace_id = "hello world" + missing_value_interpretations = {} + default_missing_value_interpretation = :MISSING_VALUE_INTERPRETATION_UNSPECIFIED + client_stats = {} + + append_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :append_rows, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, append_rows_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats + enum_input = [request_hash, request_proto].to_enum + c.append_rows enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats + stream_input = Gapic::StreamInput.new + c.append_rows stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats + enum_input = [request_hash, request_proto].to_enum + c.append_rows enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats + stream_input = Gapic::StreamInput.new + c.append_rows stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, append_rows_client_stub.call_rpc_count + append_rows_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest, r + assert_equal "hello world", r["write_stream"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int64Value), r["offset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData), r["proto_rows"] + assert_equal :proto_rows, r.rows + assert_equal "hello world", r["trace_id"] + assert_equal({}, r["missing_value_interpretations"].to_h) + assert_equal :MISSING_VALUE_INTERPRETATION_UNSPECIFIED, r["default_missing_value_interpretation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ClientStats), r["client_stats"] + end + end + end + end + + def test_get_write_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::WriteStream.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :WRITE_STREAM_VIEW_UNSPECIFIED + + get_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_write_stream, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, request + assert_equal "hello world", request["name"] + assert_equal :WRITE_STREAM_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_write_stream_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_write_stream({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_write_stream name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_write_stream ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_write_stream({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_write_stream(::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_write_stream_client_stub.call_rpc_count + end + end + + def test_finalize_write_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + finalize_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :finalize_write_stream, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, finalize_write_stream_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.finalize_write_stream({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.finalize_write_stream name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.finalize_write_stream ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.finalize_write_stream({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.finalize_write_stream(::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, finalize_write_stream_client_stub.call_rpc_count + end + end + + def test_batch_commit_write_streams + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + write_streams = ["hello world"] + + batch_commit_write_streams_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_commit_write_streams, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["write_streams"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_commit_write_streams_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.batch_commit_write_streams({ parent: parent, write_streams: write_streams }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.batch_commit_write_streams parent: parent, write_streams: write_streams do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.batch_commit_write_streams ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new(parent: parent, write_streams: write_streams) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.batch_commit_write_streams({ parent: parent, write_streams: write_streams }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.batch_commit_write_streams(::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new(parent: parent, write_streams: write_streams), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_commit_write_streams_client_stub.call_rpc_count + end + end + + def test_flush_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + write_stream = "hello world" + offset = {} + + flush_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :flush_rows, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, request + assert_equal "hello world", request["write_stream"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int64Value), request["offset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, flush_rows_client_stub do + # Create client + c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.flush_rows({ write_stream: write_stream, offset: offset }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.flush_rows write_stream: write_stream, offset: offset do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.flush_rows ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new(write_stream: write_stream, offset: offset) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.flush_rows({ write_stream: write_stream, offset: offset }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.flush_rows(::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new(write_stream: write_stream, offset: offset), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, flush_rows_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 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 +# +# https://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. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From fe0d4aa514520553d9bdef77319326ddbc2bc880 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 14 Aug 2026 00:01:06 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../storage/v1/big_query_read/client.rb | 6 +- .../cloud/bigquery/storage/v1/storage_pb.rb | 5 +- .../storage/v1/storage_services_pb.rb | 2 +- .../cloud/bigquery/storage/v1/storage.rb | 81 +- .../storage/v1/big_query_read_test.rb | 13 +- .../storage/v1/big_query_write_test.rb | 18 +- .../.gitignore | 20 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-bigquery-storage-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../google-cloud-bigquery-storage-v1/Gemfile | 15 - .../LICENSE.md | 201 ---- .../README.md | 154 --- .../google-cloud-bigquery-storage-v1/Rakefile | 169 --- .../gapic_metadata.json | 72 -- .../google-cloud-bigquery-storage-v1.gemspec | 28 - .../lib/google-cloud-bigquery-storage-v1.rb | 21 - .../lib/google/cloud/bigquery/storage/v1.rb | 43 - .../bigquery/storage/v1/annotations_pb.rb | 24 - .../cloud/bigquery/storage/v1/arrow_pb.rb | 27 - .../cloud/bigquery/storage/v1/avro_pb.rb | 26 - .../bigquery/storage/v1/big_query_read.rb | 53 - .../storage/v1/big_query_read/client.rb | 756 ------------ .../storage/v1/big_query_read/credentials.rb | 54 - .../storage/v1/big_query_read/paths.rb | 108 -- .../bigquery/storage/v1/big_query_write.rb | 56 - .../storage/v1/big_query_write/client.rb | 1028 ----------------- .../storage/v1/big_query_write/credentials.rb | 55 - .../storage/v1/big_query_write/paths.rb | 75 -- .../cloud/bigquery/storage/v1/protobuf_pb.rb | 26 - .../cloud/bigquery/storage/v1/storage_pb.rb | 64 - .../storage/v1/storage_services_pb.rb | 167 --- .../cloud/bigquery/storage/v1/stream_pb.rb | 39 - .../cloud/bigquery/storage/v1/table_pb.rb | 30 - .../cloud/bigquery/storage/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---------- .../proto_docs/google/api/field_behavior.rb | 85 -- .../proto_docs/google/api/launch_stage.rb | 71 -- .../proto_docs/google/api/resource.rb | 227 ---- .../google/cloud/bigquery/storage/v1/arrow.rb | 103 -- .../google/cloud/bigquery/storage/v1/avro.rb | 95 -- .../cloud/bigquery/storage/v1/protobuf.rb | 56 - .../cloud/bigquery/storage/v1/storage.rb | 697 ----------- .../cloud/bigquery/storage/v1/stream.rb | 321 ----- .../google/cloud/bigquery/storage/v1/table.rb | 208 ---- .../proto_docs/google/protobuf/any.rb | 145 --- .../proto_docs/google/protobuf/duration.rb | 98 -- .../proto_docs/google/protobuf/timestamp.rb | 128 -- .../proto_docs/google/protobuf/wrappers.rb | 148 --- .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../big_query_read/create_read_session.rb | 47 - .../snippets/big_query_read/read_rows.rb | 50 - .../big_query_read/split_read_stream.rb | 47 - .../snippets/big_query_write/append_rows.rb | 56 - .../batch_commit_write_streams.rb | 47 - .../big_query_write/create_write_stream.rb | 47 - .../big_query_write/finalize_write_stream.rb | 47 - .../snippets/big_query_write/flush_rows.rb | 47 - .../big_query_write/get_write_stream.rb | 47 - ...data_google.cloud.bigquery.storage.v1.json | 375 ------ .../storage/v1/big_query_read_paths_test.rb | 91 -- .../storage/v1/big_query_read_test.rb | 306 ----- .../storage/v1/big_query_write_paths_test.rb | 67 -- .../storage/v1/big_query_write_test.rb | 503 -------- .../test/helper.rb | 35 - 70 files changed, 108 insertions(+), 8444 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb diff --git a/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb b/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb index d4f28997b319..4bbe6ce123ef 100644 --- a/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb +++ b/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb @@ -346,7 +346,7 @@ def create_read_session request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload read_rows(read_stream: nil, offset: nil) + # @overload read_rows(read_stream: nil, offset: nil, arrow_serialization_options: nil) # Pass arguments to `read_rows` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -357,6 +357,10 @@ def create_read_session request, options = nil # The offset requested must be less than the last row read from Read. # Requesting a larger offset is undefined. If not specified, start reading # from offset zero. + # @param arrow_serialization_options [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions, ::Hash] + # Optional. Options specific to the Apache Arrow output format. + # + # This feature is not yet available. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] diff --git a/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb b/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb index 4dbee16c83bc..42b7a9dc062f 100644 --- a/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb +++ b/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb @@ -18,7 +18,7 @@ require 'google/rpc/status_pb' -descriptor_data = "\n.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a/google/cloud/bigquery/storage/v1/protobuf.proto\x1a-google/cloud/bigquery/storage/v1/stream.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xe7\x01\n\x18\x43reateReadSessionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x0cread_session\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xe0\x41\x02\x12\x18\n\x10max_stream_count\x18\x03 \x01(\x05\x12\"\n\x1apreferred_min_stream_count\x18\x04 \x01(\x05\"i\n\x0fReadRowsRequest\x12\x46\n\x0bread_stream\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x0e\n\x06offset\x18\x02 \x01(\x03\")\n\rThrottleState\x12\x18\n\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\n\x0bStreamStats\x12H\n\x08progress\x18\x02 \x01(\x0b\x32\x36.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1a>\n\x08Progress\x12\x19\n\x11\x61t_response_start\x18\x01 \x01(\x01\x12\x17\n\x0f\x61t_response_end\x18\x02 \x01(\x01\"\xac\x04\n\x10ReadRowsResponse\x12?\n\tavro_rows\x18\x03 \x01(\x0b\x32*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\n\x12\x61rrow_record_batch\x18\x04 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\n\trow_count\x18\x06 \x01(\x03\x12<\n\x05stats\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.StreamStats\x12G\n\x0ethrottle_state\x18\x05 \x01(\x0b\x32/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\n\x0b\x61vro_schema\x18\x07 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x01\x12J\n\x0c\x61rrow_schema\x18\x08 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x01\x12(\n\x16uncompressed_byte_size\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04rowsB\x08\n\x06schemaB\x19\n\x17_uncompressed_byte_size\"k\n\x16SplitReadStreamRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x10\n\x08\x66raction\x18\x02 \x01(\x01\"\xa7\x01\n\x17SplitReadStreamResponse\x12\x44\n\x0eprimary_stream\x18\x01 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\x12\x46\n\x10remainder_stream\x18\x02 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\"\x9b\x01\n\x18\x43reateWriteStreamRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12H\n\x0cwrite_stream\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xe0\x41\x02\"\xf8\x08\n\x11\x41ppendRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12S\n\nproto_rows\x18\x04 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\n\narrow_rows\x18\x05 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\n\x08trace_id\x18\x06 \x01(\t\x12{\n\x1dmissing_value_interpretations\x18\x07 \x03(\x0b\x32T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\n$default_missing_value_interpretation\x18\x08 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xe0\x41\x01\x1a\x93\x01\n\tArrowData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\n\x04rows\x18\x02 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1a\x8c\x01\n\tProtoData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ProtoSchema\x12\x39\n\x04rows\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.storage.v1.ProtoRows\x1a\x92\x01\n MissingValueInterpretationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12]\n\x05value\x18\x02 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x02\x38\x01\"m\n\x1aMissingValueInterpretation\x12,\n(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0e\n\nNULL_VALUE\x10\x01\x12\x11\n\rDEFAULT_VALUE\x10\x02\x42\x06\n\x04rows\"\xfb\x02\n\x12\x41ppendRowsResponse\x12Z\n\rappend_result\x18\x01 \x01(\x0b\x32\x41.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x45\n\x0eupdated_schema\x18\x03 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchema\x12>\n\nrow_errors\x18\x04 \x03(\x0b\x32*.google.cloud.bigquery.storage.v1.RowError\x12\x14\n\x0cwrite_stream\x18\x05 \x01(\t\x1a;\n\x0c\x41ppendResult\x12+\n\x06offset\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\n\n\x08response\"\x9a\x01\n\x15GetWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12?\n\x04view\x18\x03 \x01(\x0e\x32\x31.google.cloud.bigquery.storage.v1.WriteStreamView\"s\n\x1e\x42\x61tchCommitWriteStreamsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12\x1a\n\rwrite_streams\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x99\x01\n\x1f\x42\x61tchCommitWriteStreamsResponse\x12/\n\x0b\x63ommit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\rstream_errors\x18\x02 \x03(\x0b\x32..google.cloud.bigquery.storage.v1.StorageError\"^\n\x1a\x46inalizeWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\"0\n\x1b\x46inalizeWriteStreamResponse\x12\x11\n\trow_count\x18\x01 \x01(\x03\"\x89\x01\n\x10\x46lushRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"#\n\x11\x46lushRowsResponse\x12\x0e\n\x06offset\x18\x01 \x01(\x03\"\xa4\x04\n\x0cStorageError\x12M\n\x04\x63ode\x18\x01 \x01(\x0e\x32?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\t\"\x9d\x03\n\x10StorageErrorCode\x12\"\n\x1eSTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fTABLE_NOT_FOUND\x10\x01\x12\x1c\n\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\n\x10STREAM_NOT_FOUND\x10\x03\x12\x17\n\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\n\x14INVALID_STREAM_STATE\x10\x05\x12\x14\n\x10STREAM_FINALIZED\x10\x06\x12 \n\x1cSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\n\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\n\x13OFFSET_OUT_OF_RANGE\x10\t\x12\x15\n\x11\x43MEK_NOT_PROVIDED\x10\n\x12\x19\n\x15INVALID_CMEK_PROVIDED\x10\x0b\x12\x19\n\x15\x43MEK_ENCRYPTION_ERROR\x10\x0c\x12\x15\n\x11KMS_SERVICE_ERROR\x10\r\x12\x19\n\x15KMS_PERMISSION_DENIED\x10\x0e\"\xb3\x01\n\x08RowError\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x45\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0f\n\x07message\x18\x03 \x01(\t\"@\n\x0cRowErrorCode\x12\x1e\n\x1aROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46IELDS_ERROR\x10\x01\x32\x92\x06\n\x0c\x42igQueryRead\x12\xe9\x01\n\x11\x43reateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1a-.google.cloud.bigquery.storage.v1.ReadSession\"i\xda\x41$parent,read_session,max_stream_count\x82\xd3\xe4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xcf\x01\n\x08ReadRows\x12\x31.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1a\x32.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xda\x41\x12read_stream,offset\x82\xd3\xe4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xc6\x01\n\x0fSplitReadStream\x12\x38.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1a\x39.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1a{\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xbc\x0b\n\rBigQueryWrite\x12\xd7\x01\n\x11\x43reateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"W\xda\x41\x13parent,write_stream\x82\xd3\xe4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0cwrite_stream\x12\xd2\x01\n\nAppendRows\x12\x33.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1a\x34.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x01\x30\x01\x12\xbf\x01\n\x0eGetWriteStream\x12\x37.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xd9\x01\n\x13\x46inalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1a=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xdc\x01\n\x17\x42\x61tchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1a\x41.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xcb\x01\n\tFlushRows\x12\x32.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1a\x33.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1a\xb0\x01\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\n$com.google.cloud.bigquery.storage.v1B\x0cStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" +descriptor_data = "\n.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a/google/cloud/bigquery/storage/v1/protobuf.proto\x1a-google/cloud/bigquery/storage/v1/stream.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xe7\x01\n\x18\x43reateReadSessionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x0cread_session\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xe0\x41\x02\x12\x18\n\x10max_stream_count\x18\x03 \x01(\x05\x12\"\n\x1apreferred_min_stream_count\x18\x04 \x01(\x05\"\xf9\x01\n\x0fReadRowsRequest\x12\x46\n\x0bread_stream\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x0e\n\x06offset\x18\x02 \x01(\x03\x12g\n\x1b\x61rrow_serialization_options\x18\x05 \x01(\x0b\x32;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xe0\x41\x01H\x00\x42%\n#output_format_serialization_options\")\n\rThrottleState\x12\x18\n\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\n\x0bStreamStats\x12H\n\x08progress\x18\x02 \x01(\x0b\x32\x36.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1a>\n\x08Progress\x12\x19\n\x11\x61t_response_start\x18\x01 \x01(\x01\x12\x17\n\x0f\x61t_response_end\x18\x02 \x01(\x01\"\xf7\x04\n\x10ReadRowsResponse\x12?\n\tavro_rows\x18\x03 \x01(\x0b\x32*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\n\x12\x61rrow_record_batch\x18\x04 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\n\trow_count\x18\x06 \x01(\x03\x12<\n\x05stats\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.StreamStats\x12G\n\x0ethrottle_state\x18\x05 \x01(\x0b\x32/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\n\x0b\x61vro_schema\x18\x07 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x01\x12J\n\x0c\x61rrow_schema\x18\x08 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x01\x12(\n\x16uncompressed_byte_size\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12+\n\x19total_estimated_row_count\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x06\n\x04rowsB\x08\n\x06schemaB\x19\n\x17_uncompressed_byte_sizeB\x1c\n\x1a_total_estimated_row_count\"k\n\x16SplitReadStreamRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x10\n\x08\x66raction\x18\x02 \x01(\x01\"\xa7\x01\n\x17SplitReadStreamResponse\x12\x44\n\x0eprimary_stream\x18\x01 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\x12\x46\n\x10remainder_stream\x18\x02 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\"\x9b\x01\n\x18\x43reateWriteStreamRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12H\n\x0cwrite_stream\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xe0\x41\x02\"\xc2\t\n\x11\x41ppendRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12S\n\nproto_rows\x18\x04 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\n\narrow_rows\x18\x05 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\n\x08trace_id\x18\x06 \x01(\t\x12{\n\x1dmissing_value_interpretations\x18\x07 \x03(\x0b\x32T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\n$default_missing_value_interpretation\x18\x08 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xe0\x41\x01\x12H\n\x0c\x63lient_stats\x18\t \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ClientStatsB\x03\xe0\x41\x01\x1a\x93\x01\n\tArrowData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\n\x04rows\x18\x02 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1a\x8c\x01\n\tProtoData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ProtoSchema\x12\x39\n\x04rows\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.storage.v1.ProtoRows\x1a\x92\x01\n MissingValueInterpretationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12]\n\x05value\x18\x02 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x02\x38\x01\"m\n\x1aMissingValueInterpretation\x12,\n(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0e\n\nNULL_VALUE\x10\x01\x12\x11\n\rDEFAULT_VALUE\x10\x02\x42\x06\n\x04rows\"\xfb\x02\n\x12\x41ppendRowsResponse\x12Z\n\rappend_result\x18\x01 \x01(\x0b\x32\x41.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x45\n\x0eupdated_schema\x18\x03 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchema\x12>\n\nrow_errors\x18\x04 \x03(\x0b\x32*.google.cloud.bigquery.storage.v1.RowError\x12\x14\n\x0cwrite_stream\x18\x05 \x01(\t\x1a;\n\x0c\x41ppendResult\x12+\n\x06offset\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\n\n\x08response\"\x9a\x01\n\x15GetWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12?\n\x04view\x18\x03 \x01(\x0e\x32\x31.google.cloud.bigquery.storage.v1.WriteStreamView\"s\n\x1e\x42\x61tchCommitWriteStreamsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12\x1a\n\rwrite_streams\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x99\x01\n\x1f\x42\x61tchCommitWriteStreamsResponse\x12/\n\x0b\x63ommit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\rstream_errors\x18\x02 \x03(\x0b\x32..google.cloud.bigquery.storage.v1.StorageError\"^\n\x1a\x46inalizeWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\"0\n\x1b\x46inalizeWriteStreamResponse\x12\x11\n\trow_count\x18\x01 \x01(\x03\"\x89\x01\n\x10\x46lushRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"#\n\x11\x46lushRowsResponse\x12\x0e\n\x06offset\x18\x01 \x01(\x03\"\xa4\x04\n\x0cStorageError\x12M\n\x04\x63ode\x18\x01 \x01(\x0e\x32?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\t\"\x9d\x03\n\x10StorageErrorCode\x12\"\n\x1eSTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fTABLE_NOT_FOUND\x10\x01\x12\x1c\n\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\n\x10STREAM_NOT_FOUND\x10\x03\x12\x17\n\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\n\x14INVALID_STREAM_STATE\x10\x05\x12\x14\n\x10STREAM_FINALIZED\x10\x06\x12 \n\x1cSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\n\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\n\x13OFFSET_OUT_OF_RANGE\x10\t\x12\x15\n\x11\x43MEK_NOT_PROVIDED\x10\n\x12\x19\n\x15INVALID_CMEK_PROVIDED\x10\x0b\x12\x19\n\x15\x43MEK_ENCRYPTION_ERROR\x10\x0c\x12\x15\n\x11KMS_SERVICE_ERROR\x10\r\x12\x19\n\x15KMS_PERMISSION_DENIED\x10\x0e\"\xb3\x01\n\x08RowError\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x45\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0f\n\x07message\x18\x03 \x01(\t\"@\n\x0cRowErrorCode\x12\x1e\n\x1aROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46IELDS_ERROR\x10\x01\"\x96\x07\n\x0b\x43lientStats\x12V\n\rrequest_stats\x18\x01 \x01(\x0b\x32:.google.cloud.bigquery.storage.v1.ClientStats.RequestStatsB\x03\xe0\x41\x01\x12T\n\x0cwindow_stats\x18\x02 \x01(\x0b\x32\x39.google.cloud.bigquery.storage.v1.ClientStats.WindowStatsB\x03\xe0\x41\x01\x1a\x8a\x01\n\x0cRequestStats\x12\"\n\x10send_time_millis\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15queued_requests_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_send_time_millisB\x18\n\x16_queued_requests_count\x1a\xcb\x04\n\x0bWindowStats\x12-\n\x1bmax_response_latency_millis\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x1b\x61vg_response_latency_millis\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x1flongest_wait_no_response_millis\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12%\n\x13requests_sent_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12*\n\x18responses_received_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10\x62ytes_sent_count\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x30\n\x1ewindow_start_time_epoch_millis\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x1f\n\rwindow_millis\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x42\x1e\n\x1c_max_response_latency_millisB\x1e\n\x1c_avg_response_latency_millisB\"\n _longest_wait_no_response_millisB\x16\n\x14_requests_sent_countB\x1b\n\x19_responses_received_countB\x13\n\x11_bytes_sent_countB!\n\x1f_window_start_time_epoch_millisB\x10\n\x0e_window_millis2\x92\x06\n\x0c\x42igQueryRead\x12\xe9\x01\n\x11\x43reateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1a-.google.cloud.bigquery.storage.v1.ReadSession\"i\xda\x41$parent,read_session,max_stream_count\x82\xd3\xe4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xcf\x01\n\x08ReadRows\x12\x31.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1a\x32.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xda\x41\x12read_stream,offset\x82\xd3\xe4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xc6\x01\n\x0fSplitReadStream\x12\x38.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1a\x39.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1a{\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xbc\x0b\n\rBigQueryWrite\x12\xd7\x01\n\x11\x43reateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"W\xda\x41\x13parent,write_stream\x82\xd3\xe4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0cwrite_stream\x12\xd2\x01\n\nAppendRows\x12\x33.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1a\x34.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x01\x30\x01\x12\xbf\x01\n\x0eGetWriteStream\x12\x37.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xd9\x01\n\x13\x46inalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1a=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xdc\x01\n\x17\x42\x61tchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1a\x41.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xcb\x01\n\tFlushRows\x12\x32.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1a\x33.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1a\xb0\x01\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\n$com.google.cloud.bigquery.storage.v1B\x0cStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -54,6 +54,9 @@ module V1 StorageError::StorageErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode").enummodule RowError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError").msgclass RowError::RowErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError.RowErrorCode").enummodule + ClientStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats").msgclass + ClientStats::RequestStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats.RequestStats").msgclass + ClientStats::WindowStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats.WindowStats").msgclass end end end diff --git a/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb b/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb index 5fdee674034c..ffd73ad9f783 100644 --- a/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb +++ b/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb @@ -1,7 +1,7 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/bigquery/storage/v1/storage.proto for package 'google.cloud.bigquery.storage.v1' # Original file comments: -# Copyright 2025 Google LLC +# Copyright 2026 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/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb b/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb index 8b6b4f65fa0c..01b68119dc9a 100644 --- a/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb +++ b/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb @@ -66,6 +66,11 @@ class CreateReadSessionRequest # The offset requested must be less than the last row read from Read. # Requesting a larger offset is undefined. If not specified, start reading # from offset zero. + # @!attribute [rw] arrow_serialization_options + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions] + # Optional. Options specific to the Apache Arrow output format. + # + # This feature is not yet available. class ReadRowsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -161,6 +166,12 @@ class Progress # 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. + # @!attribute [r] total_estimated_row_count + # @return [::Integer] + # Output only. The total estimated number of rows in the query results. + # Only populated when reading data from a BigQuery job. + # + # This feature is not yet available. class ReadRowsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -219,7 +230,7 @@ class CreateWriteStreamRequest # switching table destinations. You can also switch table destinations within # the same connection for the default stream. # - # The size of a single AppendRowsRequest must be less than 10 MB in size. + # The size of a single AppendRowsRequest must be less than 20 MB in size. # Requests larger than this return an error, typically `INVALID_ARGUMENT`. # @!attribute [rw] write_stream # @return [::String] @@ -306,6 +317,9 @@ class CreateWriteStreamRequest # `NULL` instead of using default values for some columns, you can set # `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same # time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + # @!attribute [rw] client_stats + # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats] + # Optional. Stats and telemetry data gathered on the client side. class AppendRowsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -611,6 +625,71 @@ module RowErrorCode FIELDS_ERROR = 1 end end + + # Stats and telemetry data gathered on the client side about requests + # being sent to the BigQuery Storage service, for internal use only. + # @!attribute [rw] request_stats + # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats::RequestStats] + # Optional. Per-request stats. + # @!attribute [rw] window_stats + # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats::WindowStats] + # Optional. Windowed stats. + class ClientStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stats and telemetry data gathered on the client side about a single + # request. + # @!attribute [rw] send_time_millis + # @return [::Integer] + # Optional. Timestamp indicating when the request was sent over the + # network, expressed in epoch milliseconds. + # @!attribute [rw] queued_requests_count + # @return [::Integer] + # Optional. Number of pending requests at the moment this request was sent. + # This includes requests waiting to be sent, and those that are inflight. + class RequestStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Aggregate connection metrics over a window interval. + # @!attribute [rw] max_response_latency_millis + # @return [::Integer] + # Optional. The maximum response latency observed in the window, expressed + # in milliseconds. + # @!attribute [rw] avg_response_latency_millis + # @return [::Integer] + # Optional. The average response latency observed in the window, expressed + # in milliseconds. + # @!attribute [rw] longest_wait_no_response_millis + # @return [::Integer] + # Optional. The longest time spent waiting without receiving a response in + # the window. This could exceed max_response_latency_millis because the + # latter is evaluated only when a response is received. Expressed in + # milliseconds. + # @!attribute [rw] requests_sent_count + # @return [::Integer] + # Optional. How many requests were sent in the window. + # @!attribute [rw] responses_received_count + # @return [::Integer] + # Optional. How many responses were received in the window. + # @!attribute [rw] bytes_sent_count + # @return [::Integer] + # Optional. How many bytes were sent in the window. + # @!attribute [rw] window_start_time_epoch_millis + # @return [::Integer] + # Optional. Start time of the window interval for which these stats are + # aggregated, expressed in epoch milliseconds. + # @!attribute [rw] window_millis + # @return [::Integer] + # Optional. Duration of the window interval for which these stats are + # aggregated, expressed in milliseconds. + class WindowStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end end end end diff --git a/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb b/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb index c1621e4d15ec..7f67d1586d09 100644 --- a/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb +++ b/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb @@ -137,12 +137,15 @@ def test_read_rows # Create request parameters for a server streaming method. read_stream = "hello world" offset = 42 + arrow_serialization_options = {} read_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| assert_equal :read_rows, name assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, request assert_equal "hello world", request["read_stream"] assert_equal 42, request["offset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions), request["arrow_serialization_options"] + assert_equal :arrow_serialization_options, request.output_format_serialization_options refute_nil options end @@ -153,7 +156,7 @@ def test_read_rows end # Use hash object - c.read_rows({ read_stream: read_stream, offset: offset }) do |response, operation| + c.read_rows({ read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options }) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r @@ -162,7 +165,7 @@ def test_read_rows end # Use named arguments - c.read_rows read_stream: read_stream, offset: offset do |response, operation| + c.read_rows read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r @@ -171,7 +174,7 @@ def test_read_rows end # Use protobuf object - c.read_rows ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset) do |response, operation| + c.read_rows ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r @@ -180,7 +183,7 @@ def test_read_rows end # Use hash object with options - c.read_rows({ read_stream: read_stream, offset: offset }, grpc_options) do |response, operation| + c.read_rows({ read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options }, grpc_options) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r @@ -189,7 +192,7 @@ def test_read_rows end # Use protobuf object with options - c.read_rows(::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset), grpc_options) do |response, operation| + c.read_rows(::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options), grpc_options) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r diff --git a/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb b/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb index 0cb124e3e453..1f6731d962f6 100644 --- a/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb +++ b/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb @@ -137,6 +137,7 @@ def test_append_rows trace_id = "hello world" missing_value_interpretations = {} default_missing_value_interpretation = :MISSING_VALUE_INTERPRETATION_UNSPECIFIED + client_stats = {} append_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| assert_equal :append_rows, name @@ -152,8 +153,8 @@ def test_append_rows end # Use enumerable object with hash and protobuf object. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats enum_input = [request_hash, request_proto].to_enum c.append_rows enum_input do |response, operation| assert_kind_of Enumerable, response @@ -164,8 +165,8 @@ def test_append_rows end # Use stream input object (from gapic-common). - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats stream_input = Gapic::StreamInput.new c.append_rows stream_input do |response, operation| assert_kind_of Enumerable, response @@ -179,8 +180,8 @@ def test_append_rows stream_input.close # Use enumerable object with hash and protobuf object with options. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats enum_input = [request_hash, request_proto].to_enum c.append_rows enum_input, grpc_options do |response, operation| assert_kind_of Enumerable, response @@ -191,8 +192,8 @@ def test_append_rows end # Use stream input object (from gapic-common) with options. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats stream_input = Gapic::StreamInput.new c.append_rows stream_input, grpc_options do |response, operation| assert_kind_of Enumerable, response @@ -217,6 +218,7 @@ def test_append_rows assert_equal "hello world", r["trace_id"] assert_equal({}, r["missing_value_interpretations"].to_h) assert_equal :MISSING_VALUE_INTERPRETATION_UNSPECIFIED, r["default_missing_value_interpretation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ClientStats), r["client_stats"] end end end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json deleted file mode 100644 index 8cb93992c598..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "bigquerystorage.googleapis.com", - "api_shortname": "bigquerystorage", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest", - "distribution_name": "google-cloud-bigquery-storage-v1", - "is_cloud": true, - "language": "ruby", - "name": "bigquerystorage", - "name_pretty": "BigQuery Storage V1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs/reference/storage", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The BigQuery Storage API provides fast access to BigQuery managed storage. Note that google-cloud-bigquery-storage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-storage instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BIGQUERY_STORAGE", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/storage", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml deleted file mode 100644 index bb0c68b12d1c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-storage-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-storage-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts deleted file mode 100644 index 1a833c85dd93..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Storage V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md deleted file mode 100644 index 8f8f40a73a32..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-storage-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-storage-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/storage/v1" - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/storage/v1" - -::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-bigquery-storage-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/storage/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md deleted file mode 100644 index 379f7d42aadf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Storage V1 API - -API Client library for the BigQuery Storage V1 API - -The BigQuery Storage API provides fast access to BigQuery managed storage. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Storage V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-storage](https://rubygems.org/gems/google-cloud-bigquery-storage). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-storage-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerystorage.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/storage/v1" - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new -request = ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new # (request fields as keyword arguments...) -response = client.create_read_session request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/storage) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/bigquery/storage/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-bigquery-storage`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-storage-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-storage`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-bigquery-storage-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile deleted file mode 100644 index 6b7aba3e8219..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-storage-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BIGQUERY_STORAGE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BIGQUERY_STORAGE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BIGQUERY_STORAGE_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BIGQUERY_STORAGE_TEST_PROJECT=test123 BIGQUERY_STORAGE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/storage/v1/big_query_read/credentials" - ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BIGQUERY_STORAGE_PROJECT"] = project - ENV["BIGQUERY_STORAGE_TEST_PROJECT"] = project - ENV["BIGQUERY_STORAGE_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-storage-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-storage-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-storage-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-storage-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-storage-v1" - header "google-cloud-bigquery-storage-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-storage-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-storage-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-storage-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-storage-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json deleted file mode 100644 index 0de72ac153d4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.storage.v1", - "libraryPackage": "::Google::Cloud::Bigquery::Storage::V1", - "services": { - "BigQueryRead": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client", - "rpcs": { - "CreateReadSession": { - "methods": [ - "create_read_session" - ] - }, - "ReadRows": { - "methods": [ - "read_rows" - ] - }, - "SplitReadStream": { - "methods": [ - "split_read_stream" - ] - } - } - } - } - }, - "BigQueryWrite": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client", - "rpcs": { - "CreateWriteStream": { - "methods": [ - "create_write_stream" - ] - }, - "AppendRows": { - "methods": [ - "append_rows" - ] - }, - "GetWriteStream": { - "methods": [ - "get_write_stream" - ] - }, - "FinalizeWriteStream": { - "methods": [ - "finalize_write_stream" - ] - }, - "BatchCommitWriteStreams": { - "methods": [ - "batch_commit_write_streams" - ] - }, - "FlushRows": { - "methods": [ - "flush_rows" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec deleted file mode 100644 index 56de5bc430bf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/storage/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-storage-v1" - gem.version = Google::Cloud::Bigquery::Storage::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The BigQuery Storage API provides fast access to BigQuery managed storage. Note that google-cloud-bigquery-storage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-storage instead. See the readme for more details." - gem.summary = "API Client library for the BigQuery Storage V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb deleted file mode 100644 index 78e6f6aa0b72..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/storage/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb deleted file mode 100644 index 7275f890346f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/storage/v1/big_query_read" -require "google/cloud/bigquery/storage/v1/big_query_write" -require "google/cloud/bigquery/storage/v1/version" - -module Google - module Cloud - module Bigquery - module Storage - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/storage/v1" - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/storage/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb deleted file mode 100644 index edcabf45ec84..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/annotations.proto - -require 'google/protobuf' - -require 'google/protobuf/descriptor_pb' - - -descriptor_data = "\n2google/cloud/bigquery/storage/v1/annotations.proto\x12 google.cloud.bigquery.storage.v1\x1a google/protobuf/descriptor.proto:9\n\x0b\x63olumn_name\x12\x1d.google.protobuf.FieldOptions\x18\xb5\xc3\xf7\xd8\x01 \x01(\t\x88\x01\x01\x42\xc0\x01\n$com.google.cloud.bigquery.storage.v1B\x10\x41nnotationsProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb deleted file mode 100644 index 049c42b43216..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/arrow.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/bigquery/storage/v1/arrow.proto\x12 google.cloud.bigquery.storage.v1\"(\n\x0b\x41rrowSchema\x12\x19\n\x11serialized_schema\x18\x01 \x01(\x0c\"J\n\x10\x41rrowRecordBatch\x12\x1f\n\x17serialized_record_batch\x18\x01 \x01(\x0c\x12\x15\n\trow_count\x18\x02 \x01(\x03\x42\x02\x18\x01\"\xec\x03\n\x19\x41rrowSerializationOptions\x12h\n\x12\x62uffer_compression\x18\x02 \x01(\x0e\x32L.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec\x12v\n\x19picos_timestamp_precision\x18\x03 \x01(\x0e\x32S.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision\"H\n\x10\x43ompressionCodec\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\r\n\tLZ4_FRAME\x10\x01\x12\x08\n\x04ZSTD\x10\x02\"\xa2\x01\n\x17PicosTimestampPrecision\x12)\n%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1d\n\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1d\n\x19TIMESTAMP_PRECISION_PICOS\x10\x03\x42\xba\x01\n$com.google.cloud.bigquery.storage.v1B\nArrowProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ArrowSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSchema").msgclass - ArrowRecordBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowRecordBatch").msgclass - ArrowSerializationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions").msgclass - ArrowSerializationOptions::CompressionCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec").enummodule - ArrowSerializationOptions::PicosTimestampPrecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb deleted file mode 100644 index bc982922603b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/avro.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/bigquery/storage/v1/avro.proto\x12 google.cloud.bigquery.storage.v1\"\x1c\n\nAvroSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\"A\n\x08\x41vroRows\x12\x1e\n\x16serialized_binary_rows\x18\x01 \x01(\x0c\x12\x15\n\trow_count\x18\x02 \x01(\x03\x42\x02\x18\x01\"\xdd\x02\n\x18\x41vroSerializationOptions\x12%\n\x1d\x65nable_display_name_attribute\x18\x01 \x01(\x08\x12u\n\x19picos_timestamp_precision\x18\x02 \x01(\x0e\x32R.google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision\"\xa2\x01\n\x17PicosTimestampPrecision\x12)\n%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1d\n\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1d\n\x19TIMESTAMP_PRECISION_PICOS\x10\x03\x42\xb9\x01\n$com.google.cloud.bigquery.storage.v1B\tAvroProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - AvroSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSchema").msgclass - AvroRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroRows").msgclass - AvroSerializationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSerializationOptions").msgclass - AvroSerializationOptions::PicosTimestampPrecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb deleted file mode 100644 index a3ea0d4c2ac9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/storage/v1/version" - -require "google/cloud/bigquery/storage/v1/big_query_read/credentials" -require "google/cloud/bigquery/storage/v1/big_query_read/paths" -require "google/cloud/bigquery/storage/v1/big_query_read/client" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ## - # BigQuery Read API. - # - # The Read API can be used to read data from BigQuery. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/storage/v1/big_query_read" - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - module BigQueryRead - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "big_query_read", "helpers.rb" -require "google/cloud/bigquery/storage/v1/big_query_read/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb deleted file mode 100644 index 4bbe6ce123ef..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb +++ /dev/null @@ -1,756 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/storage/v1/storage_pb" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryRead - ## - # Client for the BigQueryRead service. - # - # BigQuery Read API. - # - # The Read API can be used to read data from BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerystorage.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :big_query_read_stub - - ## - # Configure the BigQueryRead Client class. - # - # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BigQueryRead clients - # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "Storage", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_read_session.timeout = 600.0 - default_config.rpcs.create_read_session.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.read_rows.timeout = 86_400.0 - default_config.rpcs.read_rows.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.split_read_stream.timeout = 600.0 - default_config.rpcs.split_read_stream.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BigQueryRead Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @big_query_read_stub.universe_domain - end - - ## - # Create a new BigQueryRead client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BigQueryRead client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/bigquery/storage/v1/storage_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @big_query_read_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @big_query_read_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @big_query_read_stub.logger - end - - # Service calls - - ## - # Creates a new read session. A read session divides the contents of a - # BigQuery table into one or more streams, which can then be used to read - # data from the table. The read session also specifies properties of the - # data to be read, such as a list of columns or a push-down filter describing - # the rows to be returned. - # - # A particular row can be read by at most one stream. When the caller has - # reached the end of each stream in the session, then all the data in the - # table has been read. - # - # Data is assigned to each stream such that roughly the same number of - # rows can be read from each stream. Because the server-side unit for - # assigning data is collections of rows, the API does not guarantee that - # each stream will return the same number or rows. Additionally, the - # limits are enforced based on the number of pre-filtered rows, so some - # filters can lead to lopsided assignments. - # - # Read sessions automatically expire 6 hours after they are created and do - # not require manual clean-up by the caller. - # - # @overload create_read_session(request, options = nil) - # Pass arguments to `create_read_session` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_read_session(parent: nil, read_session: nil, max_stream_count: nil, preferred_min_stream_count: nil) - # Pass arguments to `create_read_session` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The request project that owns the session, in the form of - # `projects/{project_id}`. - # @param read_session [::Google::Cloud::Bigquery::Storage::V1::ReadSession, ::Hash] - # Required. Session to be created. - # @param max_stream_count [::Integer] - # Max initial number of streams. If unset or zero, the server will - # provide a value of streams so as to produce reasonable throughput. Must be - # non-negative. The number of streams may be lower than the requested number, - # depending on the amount parallelism that is reasonable for the table. - # There is a default system max limit of 1,000. - # - # This must be greater than or equal to preferred_min_stream_count. - # Typically, clients should either leave this unset to let the system to - # determine an upper bound OR set this a size for the maximum "units of work" - # it can gracefully handle. - # @param preferred_min_stream_count [::Integer] - # The minimum preferred stream count. This parameter can be used to inform - # the service that there is a desired lower bound on the number of streams. - # This is typically a target parallelism of the client (e.g. a Spark - # cluster with N-workers would set this to a low multiple of N to ensure - # good cluster utilization). - # - # The system will make a best effort to provide at least this number of - # streams, but in some cases might provide less. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::ReadSession] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new - # - # # Call the create_read_session method. - # result = client.create_read_session request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession. - # p result - # - def create_read_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_read_session.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.read_session&.table - header_params["read_session.table"] = request.read_session.table - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_read_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_read_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_read_stub.call_rpc :create_read_session, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Reads rows from the stream in the format prescribed by the ReadSession. - # Each response contains one or more table rows, up to a maximum of 128 MB - # per response; read requests which attempt to read individual rows larger - # than 128 MB will fail. - # - # Each request also returns a set of stream statistics reflecting the current - # state of the stream. - # - # @overload read_rows(request, options = nil) - # Pass arguments to `read_rows` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload read_rows(read_stream: nil, offset: nil, arrow_serialization_options: nil) - # Pass arguments to `read_rows` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param read_stream [::String] - # Required. Stream to read rows from. - # @param offset [::Integer] - # The offset requested must be less than the last row read from Read. - # Requesting a larger offset is undefined. If not specified, start reading - # from offset zero. - # @param arrow_serialization_options [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions, ::Hash] - # Optional. Options specific to the Apache Arrow output format. - # - # This feature is not yet available. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new - # - # # Call the read_rows method to start streaming. - # output = client.read_rows request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse - # output.each do |current_response| - # p current_response - # end - # - def read_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.read_rows.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.read_stream - header_params["read_stream"] = request.read_stream - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.read_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.read_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_read_stub.call_rpc :read_rows, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Splits a given `ReadStream` into two `ReadStream` objects. These - # `ReadStream` objects are referred to as the primary and the residual - # streams of the split. The original `ReadStream` can still be read from in - # the same manner as before. Both of the returned `ReadStream` objects can - # also be read from, and the rows returned by both child streams will be - # the same as the rows read from the original stream. - # - # Moreover, the two child streams will be allocated back-to-back in the - # original `ReadStream`. Concretely, it is guaranteed that for streams - # original, primary, and residual, that original[0-j] = primary[0-j] and - # original[j-n] = residual[0-m] once the streams have been read to - # completion. - # - # @overload split_read_stream(request, options = nil) - # Pass arguments to `split_read_stream` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload split_read_stream(name: nil, fraction: nil) - # Pass arguments to `split_read_stream` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the stream to split. - # @param fraction [::Float] - # A value in the range (0.0, 1.0) that specifies the fractional point at - # which the original stream should be split. The actual split point is - # evaluated on pre-filtered rows, so if a filter is provided, then there is - # no guarantee that the division of the rows between the new child streams - # will be proportional to this fractional value. Additionally, because the - # server-side unit for assigning data is collections of rows, this fraction - # will always map to a data storage boundary on the server side. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new - # - # # Call the split_read_stream method. - # result = client.split_read_stream request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse. - # p result - # - def split_read_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.split_read_stream.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.split_read_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.split_read_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_read_stub.call_rpc :split_read_stream, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BigQueryRead API. - # - # This class represents the configuration for BigQueryRead, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_read_session to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_read_session.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_read_session.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "bigquerystorage.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BigQueryRead API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_read_session` - # @return [::Gapic::Config::Method] - # - attr_reader :create_read_session - ## - # RPC-specific configuration for `read_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :read_rows - ## - # RPC-specific configuration for `split_read_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :split_read_stream - - # @private - def initialize parent_rpcs = nil - create_read_session_config = parent_rpcs.create_read_session if parent_rpcs.respond_to? :create_read_session - @create_read_session = ::Gapic::Config::Method.new create_read_session_config - read_rows_config = parent_rpcs.read_rows if parent_rpcs.respond_to? :read_rows - @read_rows = ::Gapic::Config::Method.new read_rows_config - split_read_stream_config = parent_rpcs.split_read_stream if parent_rpcs.respond_to? :split_read_stream - @split_read_stream = ::Gapic::Config::Method.new split_read_stream_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb deleted file mode 100644 index 4011779342be..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryRead - # Credentials for the BigQueryRead API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BIGQUERY_STORAGE_CREDENTIALS", - "BIGQUERY_STORAGE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BIGQUERY_STORAGE_CREDENTIALS_JSON", - "BIGQUERY_STORAGE_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb deleted file mode 100644 index 6d1133365b75..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryRead - # Path helper methods for the BigQueryRead API. - module Paths - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified ReadSession resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/sessions/{session}` - # - # @param project [String] - # @param location [String] - # @param session [String] - # - # @return [::String] - def read_session_path project:, location:, session: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/sessions/#{session}" - end - - ## - # Create a fully-qualified ReadStream resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/sessions/{session}/streams/{stream}` - # - # @param project [String] - # @param location [String] - # @param session [String] - # @param stream [String] - # - # @return [::String] - def read_stream_path project:, location:, session:, stream: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" - - "projects/#{project}/locations/#{location}/sessions/#{session}/streams/#{stream}" - end - - ## - # Create a fully-qualified Table resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/tables/{table}` - # - # @param project [String] - # @param dataset [String] - # @param table [String] - # - # @return [::String] - def table_path project:, dataset:, table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/tables/#{table}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb deleted file mode 100644 index aeb7c756898f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/storage/v1/version" - -require "google/cloud/bigquery/storage/v1/big_query_write/credentials" -require "google/cloud/bigquery/storage/v1/big_query_write/paths" -require "google/cloud/bigquery/storage/v1/big_query_write/client" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ## - # BigQuery Write API. - # - # The Write API can be used to write data to BigQuery. - # - # For supplementary information about the Write API, see: - # https://cloud.google.com/bigquery/docs/write-api - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/storage/v1/big_query_write" - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - module BigQueryWrite - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "big_query_write", "helpers.rb" -require "google/cloud/bigquery/storage/v1/big_query_write/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb deleted file mode 100644 index 8db0dfb2fc30..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb +++ /dev/null @@ -1,1028 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/bigquery/storage/v1/storage_pb" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryWrite - ## - # Client for the BigQueryWrite service. - # - # BigQuery Write API. - # - # The Write API can be used to write data to BigQuery. - # - # For supplementary information about the Write API, see: - # https://cloud.google.com/bigquery/docs/write-api - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerystorage.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :big_query_write_stub - - ## - # Configure the BigQueryWrite Client class. - # - # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BigQueryWrite clients - # ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "Storage", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_write_stream.timeout = 1200.0 - default_config.rpcs.create_write_stream.retry_policy = { - initial_delay: 10.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config.rpcs.append_rows.timeout = 86_400.0 - default_config.rpcs.append_rows.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_write_stream.timeout = 600.0 - default_config.rpcs.get_write_stream.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config.rpcs.finalize_write_stream.timeout = 600.0 - default_config.rpcs.finalize_write_stream.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config.rpcs.batch_commit_write_streams.timeout = 600.0 - default_config.rpcs.batch_commit_write_streams.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config.rpcs.flush_rows.timeout = 600.0 - default_config.rpcs.flush_rows.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BigQueryWrite Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @big_query_write_stub.universe_domain - end - - ## - # Create a new BigQueryWrite client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BigQueryWrite client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/bigquery/storage/v1/storage_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @big_query_write_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @big_query_write_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @big_query_write_stub.logger - end - - # Service calls - - ## - # Creates a write stream to the given table. - # Additionally, every table has a special stream named '_default' - # to which data can be written. This stream doesn't need to be created using - # CreateWriteStream. It is a stream that can be used simultaneously by any - # number of clients. Data written to this stream is considered committed as - # soon as an acknowledgement is received. - # - # @overload create_write_stream(request, options = nil) - # Pass arguments to `create_write_stream` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_write_stream(parent: nil, write_stream: nil) - # Pass arguments to `create_write_stream` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Reference to the table to which the stream belongs, in the format - # of `projects/{project}/datasets/{dataset}/tables/{table}`. - # @param write_stream [::Google::Cloud::Bigquery::Storage::V1::WriteStream, ::Hash] - # Required. Stream to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new - # - # # Call the create_write_stream method. - # result = client.create_write_stream request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. - # p result - # - def create_write_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_write_stream.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_write_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_write_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :create_write_stream, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Appends data to the given stream. - # - # If `offset` is specified, the `offset` is checked against the end of - # stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an - # attempt is made to append to an offset beyond the current end of the stream - # or `ALREADY_EXISTS` if user provides an `offset` that has already been - # written to. User can retry with adjusted offset within the same RPC - # connection. If `offset` is not specified, append happens at the end of the - # stream. - # - # The response contains an optional offset at which the append - # happened. No offset information will be returned for appends to a - # default stream. - # - # Responses are received in the same order in which requests are sent. - # There will be one response for each successful inserted request. Responses - # may optionally embed error information if the originating AppendRequest was - # not successfully processed. - # - # The specifics of when successfully appended data is made visible to the - # table are governed by the type of stream: - # - # * For COMMITTED streams (which includes the default stream), data is - # visible immediately upon successful append. - # - # * For BUFFERED streams, data is made visible via a subsequent `FlushRows` - # rpc which advances a cursor to a newer offset in the stream. - # - # * For PENDING streams, data is not made visible until the stream itself is - # finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly - # committed via the `BatchCommitWriteStreams` rpc. - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest, ::Hash>] - # An enumerable of {::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest} instances. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the append_rows method to start streaming. - # output = client.append_rows input - # - # # Send requests on the stream. For each request object, set fields by - # # passing keyword arguments. Be sure to close the stream when done. - # input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new - # input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse - # output.each do |current_response| - # p current_response - # end - # - def append_rows request, options = nil - unless request.is_a? ::Enumerable - raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum - request = request.to_enum - end - - request = request.lazy.map do |req| - ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest - end - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.append_rows.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.append_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.append_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :append_rows, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets information about a write stream. - # - # @overload get_write_stream(request, options = nil) - # Pass arguments to `get_write_stream` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_write_stream(name: nil, view: nil) - # Pass arguments to `get_write_stream` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the stream to get, in the form of - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - # @param view [::Google::Cloud::Bigquery::Storage::V1::WriteStreamView] - # Indicates whether to get full or partial view of the WriteStream. If - # not set, view returned will be basic. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new - # - # # Call the get_write_stream method. - # result = client.get_write_stream request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. - # p result - # - def get_write_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_write_stream.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_write_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_write_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :get_write_stream, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Finalize a write stream so that no new data can be appended to the - # stream. Finalize is not supported on the '_default' stream. - # - # @overload finalize_write_stream(request, options = nil) - # Pass arguments to `finalize_write_stream` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload finalize_write_stream(name: nil) - # Pass arguments to `finalize_write_stream` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the stream to finalize, in the form of - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new - # - # # Call the finalize_write_stream method. - # result = client.finalize_write_stream request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse. - # p result - # - def finalize_write_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.finalize_write_stream.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.finalize_write_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.finalize_write_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :finalize_write_stream, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Atomically commits a group of `PENDING` streams that belong to the same - # `parent` table. - # - # Streams must be finalized before commit and cannot be committed multiple - # times. Once a stream is committed, data in the stream becomes available - # for read operations. - # - # @overload batch_commit_write_streams(request, options = nil) - # Pass arguments to `batch_commit_write_streams` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_commit_write_streams(parent: nil, write_streams: nil) - # Pass arguments to `batch_commit_write_streams` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent table that all the streams should belong to, in the form - # of `projects/{project}/datasets/{dataset}/tables/{table}`. - # @param write_streams [::Array<::String>] - # Required. The group of streams that will be committed atomically. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new - # - # # Call the batch_commit_write_streams method. - # result = client.batch_commit_write_streams request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse. - # p result - # - def batch_commit_write_streams request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_commit_write_streams.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_commit_write_streams.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_commit_write_streams.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :batch_commit_write_streams, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Flushes rows to a BUFFERED stream. - # - # If users are appending rows to BUFFERED stream, flush operation is - # required in order for the rows to become available for reading. A - # Flush operation flushes up to any previously flushed offset in a BUFFERED - # stream, to the offset specified in the request. - # - # Flush is not supported on the _default stream, since it is not BUFFERED. - # - # @overload flush_rows(request, options = nil) - # Pass arguments to `flush_rows` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload flush_rows(write_stream: nil, offset: nil) - # Pass arguments to `flush_rows` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param write_stream [::String] - # Required. The stream that is the target of the flush operation. - # @param offset [::Google::Protobuf::Int64Value, ::Hash] - # Ending offset of the flush operation. Rows before this offset(including - # this offset) will be flushed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new - # - # # Call the flush_rows method. - # result = client.flush_rows request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse. - # p result - # - def flush_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.flush_rows.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Storage::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.write_stream - header_params["write_stream"] = request.write_stream - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.flush_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.flush_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :flush_rows, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BigQueryWrite API. - # - # This class represents the configuration for BigQueryWrite, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_write_stream to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_write_stream.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_write_stream.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "bigquerystorage.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BigQueryWrite API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_write_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :create_write_stream - ## - # RPC-specific configuration for `append_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :append_rows - ## - # RPC-specific configuration for `get_write_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :get_write_stream - ## - # RPC-specific configuration for `finalize_write_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :finalize_write_stream - ## - # RPC-specific configuration for `batch_commit_write_streams` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_commit_write_streams - ## - # RPC-specific configuration for `flush_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :flush_rows - - # @private - def initialize parent_rpcs = nil - create_write_stream_config = parent_rpcs.create_write_stream if parent_rpcs.respond_to? :create_write_stream - @create_write_stream = ::Gapic::Config::Method.new create_write_stream_config - append_rows_config = parent_rpcs.append_rows if parent_rpcs.respond_to? :append_rows - @append_rows = ::Gapic::Config::Method.new append_rows_config - get_write_stream_config = parent_rpcs.get_write_stream if parent_rpcs.respond_to? :get_write_stream - @get_write_stream = ::Gapic::Config::Method.new get_write_stream_config - finalize_write_stream_config = parent_rpcs.finalize_write_stream if parent_rpcs.respond_to? :finalize_write_stream - @finalize_write_stream = ::Gapic::Config::Method.new finalize_write_stream_config - batch_commit_write_streams_config = parent_rpcs.batch_commit_write_streams if parent_rpcs.respond_to? :batch_commit_write_streams - @batch_commit_write_streams = ::Gapic::Config::Method.new batch_commit_write_streams_config - flush_rows_config = parent_rpcs.flush_rows if parent_rpcs.respond_to? :flush_rows - @flush_rows = ::Gapic::Config::Method.new flush_rows_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb deleted file mode 100644 index 882a98244bb7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryWrite - # Credentials for the BigQueryWrite API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/bigquery.insertdata", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BIGQUERY_STORAGE_CREDENTIALS", - "BIGQUERY_STORAGE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BIGQUERY_STORAGE_CREDENTIALS_JSON", - "BIGQUERY_STORAGE_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb deleted file mode 100644 index e907c52fd001..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryWrite - # Path helper methods for the BigQueryWrite API. - module Paths - ## - # Create a fully-qualified Table resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/tables/{table}` - # - # @param project [String] - # @param dataset [String] - # @param table [String] - # - # @return [::String] - def table_path project:, dataset:, table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/tables/#{table}" - end - - ## - # Create a fully-qualified WriteStream resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}` - # - # @param project [String] - # @param dataset [String] - # @param table [String] - # @param stream [String] - # - # @return [::String] - def write_stream_path project:, dataset:, table:, stream: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/tables/#{table}/streams/#{stream}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb deleted file mode 100644 index 6d9356041918..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/protobuf.proto - -require 'google/protobuf' - -require 'google/protobuf/descriptor_pb' - - -descriptor_data = "\n/google/cloud/bigquery/storage/v1/protobuf.proto\x12 google.cloud.bigquery.storage.v1\x1a google/protobuf/descriptor.proto\"I\n\x0bProtoSchema\x12:\n\x10proto_descriptor\x18\x01 \x01(\x0b\x32 .google.protobuf.DescriptorProto\"$\n\tProtoRows\x12\x17\n\x0fserialized_rows\x18\x01 \x03(\x0c\x42\xbd\x01\n$com.google.cloud.bigquery.storage.v1B\rProtoBufProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ProtoSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ProtoSchema").msgclass - ProtoRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ProtoRows").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb deleted file mode 100644 index 42b7a9dc062f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/storage.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/storage/v1/arrow_pb' -require 'google/cloud/bigquery/storage/v1/avro_pb' -require 'google/cloud/bigquery/storage/v1/protobuf_pb' -require 'google/cloud/bigquery/storage/v1/stream_pb' -require 'google/cloud/bigquery/storage/v1/table_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a/google/cloud/bigquery/storage/v1/protobuf.proto\x1a-google/cloud/bigquery/storage/v1/stream.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xe7\x01\n\x18\x43reateReadSessionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x0cread_session\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xe0\x41\x02\x12\x18\n\x10max_stream_count\x18\x03 \x01(\x05\x12\"\n\x1apreferred_min_stream_count\x18\x04 \x01(\x05\"\xf9\x01\n\x0fReadRowsRequest\x12\x46\n\x0bread_stream\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x0e\n\x06offset\x18\x02 \x01(\x03\x12g\n\x1b\x61rrow_serialization_options\x18\x05 \x01(\x0b\x32;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xe0\x41\x01H\x00\x42%\n#output_format_serialization_options\")\n\rThrottleState\x12\x18\n\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\n\x0bStreamStats\x12H\n\x08progress\x18\x02 \x01(\x0b\x32\x36.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1a>\n\x08Progress\x12\x19\n\x11\x61t_response_start\x18\x01 \x01(\x01\x12\x17\n\x0f\x61t_response_end\x18\x02 \x01(\x01\"\xf7\x04\n\x10ReadRowsResponse\x12?\n\tavro_rows\x18\x03 \x01(\x0b\x32*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\n\x12\x61rrow_record_batch\x18\x04 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\n\trow_count\x18\x06 \x01(\x03\x12<\n\x05stats\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.StreamStats\x12G\n\x0ethrottle_state\x18\x05 \x01(\x0b\x32/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\n\x0b\x61vro_schema\x18\x07 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x01\x12J\n\x0c\x61rrow_schema\x18\x08 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x01\x12(\n\x16uncompressed_byte_size\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12+\n\x19total_estimated_row_count\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x06\n\x04rowsB\x08\n\x06schemaB\x19\n\x17_uncompressed_byte_sizeB\x1c\n\x1a_total_estimated_row_count\"k\n\x16SplitReadStreamRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x10\n\x08\x66raction\x18\x02 \x01(\x01\"\xa7\x01\n\x17SplitReadStreamResponse\x12\x44\n\x0eprimary_stream\x18\x01 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\x12\x46\n\x10remainder_stream\x18\x02 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\"\x9b\x01\n\x18\x43reateWriteStreamRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12H\n\x0cwrite_stream\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xe0\x41\x02\"\xc2\t\n\x11\x41ppendRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12S\n\nproto_rows\x18\x04 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\n\narrow_rows\x18\x05 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\n\x08trace_id\x18\x06 \x01(\t\x12{\n\x1dmissing_value_interpretations\x18\x07 \x03(\x0b\x32T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\n$default_missing_value_interpretation\x18\x08 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xe0\x41\x01\x12H\n\x0c\x63lient_stats\x18\t \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ClientStatsB\x03\xe0\x41\x01\x1a\x93\x01\n\tArrowData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\n\x04rows\x18\x02 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1a\x8c\x01\n\tProtoData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ProtoSchema\x12\x39\n\x04rows\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.storage.v1.ProtoRows\x1a\x92\x01\n MissingValueInterpretationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12]\n\x05value\x18\x02 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x02\x38\x01\"m\n\x1aMissingValueInterpretation\x12,\n(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0e\n\nNULL_VALUE\x10\x01\x12\x11\n\rDEFAULT_VALUE\x10\x02\x42\x06\n\x04rows\"\xfb\x02\n\x12\x41ppendRowsResponse\x12Z\n\rappend_result\x18\x01 \x01(\x0b\x32\x41.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x45\n\x0eupdated_schema\x18\x03 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchema\x12>\n\nrow_errors\x18\x04 \x03(\x0b\x32*.google.cloud.bigquery.storage.v1.RowError\x12\x14\n\x0cwrite_stream\x18\x05 \x01(\t\x1a;\n\x0c\x41ppendResult\x12+\n\x06offset\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\n\n\x08response\"\x9a\x01\n\x15GetWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12?\n\x04view\x18\x03 \x01(\x0e\x32\x31.google.cloud.bigquery.storage.v1.WriteStreamView\"s\n\x1e\x42\x61tchCommitWriteStreamsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12\x1a\n\rwrite_streams\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x99\x01\n\x1f\x42\x61tchCommitWriteStreamsResponse\x12/\n\x0b\x63ommit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\rstream_errors\x18\x02 \x03(\x0b\x32..google.cloud.bigquery.storage.v1.StorageError\"^\n\x1a\x46inalizeWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\"0\n\x1b\x46inalizeWriteStreamResponse\x12\x11\n\trow_count\x18\x01 \x01(\x03\"\x89\x01\n\x10\x46lushRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"#\n\x11\x46lushRowsResponse\x12\x0e\n\x06offset\x18\x01 \x01(\x03\"\xa4\x04\n\x0cStorageError\x12M\n\x04\x63ode\x18\x01 \x01(\x0e\x32?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\t\"\x9d\x03\n\x10StorageErrorCode\x12\"\n\x1eSTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fTABLE_NOT_FOUND\x10\x01\x12\x1c\n\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\n\x10STREAM_NOT_FOUND\x10\x03\x12\x17\n\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\n\x14INVALID_STREAM_STATE\x10\x05\x12\x14\n\x10STREAM_FINALIZED\x10\x06\x12 \n\x1cSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\n\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\n\x13OFFSET_OUT_OF_RANGE\x10\t\x12\x15\n\x11\x43MEK_NOT_PROVIDED\x10\n\x12\x19\n\x15INVALID_CMEK_PROVIDED\x10\x0b\x12\x19\n\x15\x43MEK_ENCRYPTION_ERROR\x10\x0c\x12\x15\n\x11KMS_SERVICE_ERROR\x10\r\x12\x19\n\x15KMS_PERMISSION_DENIED\x10\x0e\"\xb3\x01\n\x08RowError\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x45\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0f\n\x07message\x18\x03 \x01(\t\"@\n\x0cRowErrorCode\x12\x1e\n\x1aROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46IELDS_ERROR\x10\x01\"\x96\x07\n\x0b\x43lientStats\x12V\n\rrequest_stats\x18\x01 \x01(\x0b\x32:.google.cloud.bigquery.storage.v1.ClientStats.RequestStatsB\x03\xe0\x41\x01\x12T\n\x0cwindow_stats\x18\x02 \x01(\x0b\x32\x39.google.cloud.bigquery.storage.v1.ClientStats.WindowStatsB\x03\xe0\x41\x01\x1a\x8a\x01\n\x0cRequestStats\x12\"\n\x10send_time_millis\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\'\n\x15queued_requests_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x13\n\x11_send_time_millisB\x18\n\x16_queued_requests_count\x1a\xcb\x04\n\x0bWindowStats\x12-\n\x1bmax_response_latency_millis\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x1b\x61vg_response_latency_millis\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x31\n\x1flongest_wait_no_response_millis\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12%\n\x13requests_sent_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12*\n\x18responses_received_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\"\n\x10\x62ytes_sent_count\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x30\n\x1ewindow_start_time_epoch_millis\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x1f\n\rwindow_millis\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x42\x1e\n\x1c_max_response_latency_millisB\x1e\n\x1c_avg_response_latency_millisB\"\n _longest_wait_no_response_millisB\x16\n\x14_requests_sent_countB\x1b\n\x19_responses_received_countB\x13\n\x11_bytes_sent_countB!\n\x1f_window_start_time_epoch_millisB\x10\n\x0e_window_millis2\x92\x06\n\x0c\x42igQueryRead\x12\xe9\x01\n\x11\x43reateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1a-.google.cloud.bigquery.storage.v1.ReadSession\"i\xda\x41$parent,read_session,max_stream_count\x82\xd3\xe4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xcf\x01\n\x08ReadRows\x12\x31.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1a\x32.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xda\x41\x12read_stream,offset\x82\xd3\xe4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xc6\x01\n\x0fSplitReadStream\x12\x38.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1a\x39.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1a{\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xbc\x0b\n\rBigQueryWrite\x12\xd7\x01\n\x11\x43reateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"W\xda\x41\x13parent,write_stream\x82\xd3\xe4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0cwrite_stream\x12\xd2\x01\n\nAppendRows\x12\x33.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1a\x34.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x01\x30\x01\x12\xbf\x01\n\x0eGetWriteStream\x12\x37.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xd9\x01\n\x13\x46inalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1a=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xdc\x01\n\x17\x42\x61tchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1a\x41.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xcb\x01\n\tFlushRows\x12\x32.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1a\x33.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1a\xb0\x01\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\n$com.google.cloud.bigquery.storage.v1B\x0cStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - CreateReadSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.CreateReadSessionRequest").msgclass - ReadRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadRowsRequest").msgclass - ThrottleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ThrottleState").msgclass - StreamStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StreamStats").msgclass - StreamStats::Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StreamStats.Progress").msgclass - ReadRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadRowsResponse").msgclass - SplitReadStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.SplitReadStreamRequest").msgclass - SplitReadStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.SplitReadStreamResponse").msgclass - CreateWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.CreateWriteStreamRequest").msgclass - AppendRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest").msgclass - AppendRowsRequest::ArrowData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData").msgclass - AppendRowsRequest::ProtoData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData").msgclass - AppendRowsRequest::MissingValueInterpretation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation").enummodule - AppendRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsResponse").msgclass - AppendRowsResponse::AppendResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult").msgclass - GetWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.GetWriteStreamRequest").msgclass - BatchCommitWriteStreamsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest").msgclass - BatchCommitWriteStreamsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse").msgclass - FinalizeWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest").msgclass - FinalizeWriteStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse").msgclass - FlushRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FlushRowsRequest").msgclass - FlushRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FlushRowsResponse").msgclass - StorageError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError").msgclass - StorageError::StorageErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode").enummodule - RowError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError").msgclass - RowError::RowErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError.RowErrorCode").enummodule - ClientStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats").msgclass - ClientStats::RequestStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats.RequestStats").msgclass - ClientStats::WindowStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ClientStats.WindowStats").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb deleted file mode 100644 index ffd73ad9f783..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb +++ /dev/null @@ -1,167 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/storage/v1/storage.proto for package 'google.cloud.bigquery.storage.v1' -# Original file comments: -# Copyright 2026 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. -# - -require 'grpc' -require 'google/cloud/bigquery/storage/v1/storage_pb' - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryRead - # BigQuery Read API. - # - # The Read API can be used to read data from BigQuery. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.storage.v1.BigQueryRead' - - # Creates a new read session. A read session divides the contents of a - # BigQuery table into one or more streams, which can then be used to read - # data from the table. The read session also specifies properties of the - # data to be read, such as a list of columns or a push-down filter describing - # the rows to be returned. - # - # A particular row can be read by at most one stream. When the caller has - # reached the end of each stream in the session, then all the data in the - # table has been read. - # - # Data is assigned to each stream such that roughly the same number of - # rows can be read from each stream. Because the server-side unit for - # assigning data is collections of rows, the API does not guarantee that - # each stream will return the same number or rows. Additionally, the - # limits are enforced based on the number of pre-filtered rows, so some - # filters can lead to lopsided assignments. - # - # Read sessions automatically expire 6 hours after they are created and do - # not require manual clean-up by the caller. - rpc :CreateReadSession, ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Google::Cloud::Bigquery::Storage::V1::ReadSession - # Reads rows from the stream in the format prescribed by the ReadSession. - # Each response contains one or more table rows, up to a maximum of 128 MB - # per response; read requests which attempt to read individual rows larger - # than 128 MB will fail. - # - # Each request also returns a set of stream statistics reflecting the current - # state of the stream. - rpc :ReadRows, ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, stream(::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse) - # Splits a given `ReadStream` into two `ReadStream` objects. These - # `ReadStream` objects are referred to as the primary and the residual - # streams of the split. The original `ReadStream` can still be read from in - # the same manner as before. Both of the returned `ReadStream` objects can - # also be read from, and the rows returned by both child streams will be - # the same as the rows read from the original stream. - # - # Moreover, the two child streams will be allocated back-to-back in the - # original `ReadStream`. Concretely, it is guaranteed that for streams - # original, primary, and residual, that original[0-j] = primary[0-j] and - # original[j-n] = residual[0-m] once the streams have been read to - # completion. - rpc :SplitReadStream, ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse - end - - Stub = Service.rpc_stub_class - end - module BigQueryWrite - # BigQuery Write API. - # - # The Write API can be used to write data to BigQuery. - # - # For supplementary information about the Write API, see: - # https://cloud.google.com/bigquery/docs/write-api - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.storage.v1.BigQueryWrite' - - # Creates a write stream to the given table. - # Additionally, every table has a special stream named '_default' - # to which data can be written. This stream doesn't need to be created using - # CreateWriteStream. It is a stream that can be used simultaneously by any - # number of clients. Data written to this stream is considered committed as - # soon as an acknowledgement is received. - rpc :CreateWriteStream, ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::WriteStream - # Appends data to the given stream. - # - # If `offset` is specified, the `offset` is checked against the end of - # stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an - # attempt is made to append to an offset beyond the current end of the stream - # or `ALREADY_EXISTS` if user provides an `offset` that has already been - # written to. User can retry with adjusted offset within the same RPC - # connection. If `offset` is not specified, append happens at the end of the - # stream. - # - # The response contains an optional offset at which the append - # happened. No offset information will be returned for appends to a - # default stream. - # - # Responses are received in the same order in which requests are sent. - # There will be one response for each successful inserted request. Responses - # may optionally embed error information if the originating AppendRequest was - # not successfully processed. - # - # The specifics of when successfully appended data is made visible to the - # table are governed by the type of stream: - # - # * For COMMITTED streams (which includes the default stream), data is - # visible immediately upon successful append. - # - # * For BUFFERED streams, data is made visible via a subsequent `FlushRows` - # rpc which advances a cursor to a newer offset in the stream. - # - # * For PENDING streams, data is not made visible until the stream itself is - # finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly - # committed via the `BatchCommitWriteStreams` rpc. - rpc :AppendRows, stream(::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest), stream(::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse) - # Gets information about a write stream. - rpc :GetWriteStream, ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::WriteStream - # Finalize a write stream so that no new data can be appended to the - # stream. Finalize is not supported on the '_default' stream. - rpc :FinalizeWriteStream, ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse - # Atomically commits a group of `PENDING` streams that belong to the same - # `parent` table. - # - # Streams must be finalized before commit and cannot be committed multiple - # times. Once a stream is committed, data in the stream becomes available - # for read operations. - rpc :BatchCommitWriteStreams, ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse - # Flushes rows to a BUFFERED stream. - # - # If users are appending rows to BUFFERED stream, flush operation is - # required in order for the rows to become available for reading. A - # Flush operation flushes up to any previously flushed offset in a BUFFERED - # stream, to the offset specified in the request. - # - # Flush is not supported on the _default stream, since it is not BUFFERED. - rpc :FlushRows, ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, ::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb deleted file mode 100644 index ab4d8b662d0b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/stream.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/storage/v1/arrow_pb' -require 'google/cloud/bigquery/storage/v1/avro_pb' -require 'google/cloud/bigquery/storage/v1/table_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/bigquery/storage/v1/stream.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc3\x0c\n\x0bReadSession\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x0b\x64\x61ta_format\x18\x03 \x01(\x0e\x32,.google.cloud.bigquery.storage.v1.DataFormatB\x03\xe0\x41\x05\x12H\n\x0b\x61vro_schema\x18\x04 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x00\x12J\n\x0c\x61rrow_schema\x18\x05 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x00\x12\x34\n\x05table\x18\x06 \x01(\tB%\xe0\x41\x05\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12Z\n\x0ftable_modifiers\x18\x07 \x01(\x0b\x32<.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersB\x03\xe0\x41\x01\x12Y\n\x0cread_options\x18\x08 \x01(\x0b\x32>.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsB\x03\xe0\x41\x01\x12\x42\n\x07streams\x18\n \x03(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStreamB\x03\xe0\x41\x03\x12*\n\x1d\x65stimated_total_bytes_scanned\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03\x12/\n\"estimated_total_physical_file_size\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x65stimated_row_count\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08trace_id\x18\r \x01(\tB\x03\xe0\x41\x01\x1a\x43\n\x0eTableModifiers\x12\x31\n\rsnapshot_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x89\x05\n\x10TableReadOptions\x12\x17\n\x0fselected_fields\x18\x01 \x03(\t\x12\x17\n\x0frow_restriction\x18\x02 \x01(\t\x12g\n\x1b\x61rrow_serialization_options\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xe0\x41\x01H\x00\x12\x65\n\x1a\x61vro_serialization_options\x18\x04 \x01(\x0b\x32:.google.cloud.bigquery.storage.v1.AvroSerializationOptionsB\x03\xe0\x41\x01H\x00\x12#\n\x11sample_percentage\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x85\x01\n\x1aresponse_compression_codec\x18\x06 \x01(\x0e\x32W.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodecB\x03\xe0\x41\x01H\x02\x88\x01\x01\"j\n\x18ResponseCompressionCodec\x12*\n&RESPONSE_COMPRESSION_CODEC_UNSPECIFIED\x10\x00\x12\"\n\x1eRESPONSE_COMPRESSION_CODEC_LZ4\x10\x02\x42%\n#output_format_serialization_optionsB\x14\n\x12_sample_percentageB\x1d\n\x1b_response_compression_codec:k\xea\x41h\n*bigquerystorage.googleapis.com/ReadSession\x12:projects/{project}/locations/{location}/sessions/{session}B\x08\n\x06schema\"\x9c\x01\n\nReadStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03:{\xea\x41x\n)bigquerystorage.googleapis.com/ReadStream\x12Kprojects/{project}/locations/{location}/sessions/{session}/streams/{stream}\"\xfb\x04\n\x0bWriteStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x02 \x01(\x0e\x32\x32.google.cloud.bigquery.storage.v1.WriteStream.TypeB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63ommit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0ctable_schema\x18\x05 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchemaB\x03\xe0\x41\x03\x12P\n\nwrite_mode\x18\x07 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.WriteStream.WriteModeB\x03\xe0\x41\x05\x12\x15\n\x08location\x18\x08 \x01(\tB\x03\xe0\x41\x03\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCOMMITTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0c\n\x08\x42UFFERED\x10\x03\"3\n\tWriteMode\x12\x1a\n\x16WRITE_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06INSERT\x10\x01:v\xea\x41s\n*bigquerystorage.googleapis.com/WriteStream\x12\x45projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}*>\n\nDataFormat\x12\x1b\n\x17\x44\x41TA_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41VRO\x10\x01\x12\t\n\x05\x41RROW\x10\x02*I\n\x0fWriteStreamView\x12!\n\x1dWRITE_STREAM_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\xbb\x01\n$com.google.cloud.bigquery.storage.v1B\x0bStreamProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ReadSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession").msgclass - ReadSession::TableModifiers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableModifiers").msgclass - ReadSession::TableReadOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions").msgclass - ReadSession::TableReadOptions::ResponseCompressionCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec").enummodule - ReadStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadStream").msgclass - WriteStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream").msgclass - WriteStream::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream.Type").enummodule - WriteStream::WriteMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream.WriteMode").enummodule - DataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.DataFormat").enummodule - WriteStreamView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStreamView").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb deleted file mode 100644 index 2550b8886063..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/table.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n,google/cloud/bigquery/storage/v1/table.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/wrappers.proto\"Q\n\x0bTableSchema\x12\x42\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.storage.v1.TableFieldSchema\"\xbc\x07\n\x10TableFieldSchema\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xe0\x41\x02\x12J\n\x04mode\x18\x03 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.ModeB\x03\xe0\x41\x01\x12G\n\x06\x66ields\x18\x04 \x03(\x0b\x32\x32.google.cloud.bigquery.storage.v1.TableFieldSchemaB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmax_length\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tprecision\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x12\n\x05scale\x18\t \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18\x64\x65\x66\x61ult_value_expression\x18\n \x01(\tB\x03\xe0\x41\x01\x12=\n\x13timestamp_precision\x18\x1b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\x12\x64\n\x12range_element_type\x18\x0b \x01(\x0b\x32\x43.google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementTypeB\x03\xe0\x41\x01\x1a^\n\x10\x46ieldElementType\x12J\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xe0\x41\x02\"\xe0\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\n\n\x06STRUCT\x10\x04\x12\t\n\x05\x42YTES\x10\x05\x12\x08\n\x04\x42OOL\x10\x06\x12\r\n\tTIMESTAMP\x10\x07\x12\x08\n\x04\x44\x41TE\x10\x08\x12\x08\n\x04TIME\x10\t\x12\x0c\n\x08\x44\x41TETIME\x10\n\x12\r\n\tGEOGRAPHY\x10\x0b\x12\x0b\n\x07NUMERIC\x10\x0c\x12\x0e\n\nBIGNUMERIC\x10\r\x12\x0c\n\x08INTERVAL\x10\x0e\x12\x08\n\x04JSON\x10\x0f\x12\t\n\x05RANGE\x10\x10\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08NULLABLE\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\x42\xba\x01\n$com.google.cloud.bigquery.storage.v1B\nTableProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - TableSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableSchema").msgclass - TableFieldSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema").msgclass - TableFieldSchema::FieldElementType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType").msgclass - TableFieldSchema::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.Type").enummodule - TableFieldSchema::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.Mode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb deleted file mode 100644 index 6f9c0d00974c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md deleted file mode 100644 index 3d8a2a34b334..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Storage V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # 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. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # 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... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # 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. - module FieldBehavior - # Conventional default for enums. Do not use this. - 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. - 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`). - 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). - 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. - 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. - 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. - 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. - 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. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # 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'. 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 - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb deleted file mode 100644 index a3dc9a444a1f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - # Arrow schema as specified in - # https://arrow.apache.org/docs/python/api/datatypes.html - # and serialized to bytes using IPC: - # https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc - # - # See code samples on how this message can be deserialized. - # @!attribute [rw] serialized_schema - # @return [::String] - # IPC serialized Arrow schema. - class ArrowSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Arrow RecordBatch. - # @!attribute [rw] serialized_record_batch - # @return [::String] - # IPC-serialized Arrow RecordBatch. - # @!attribute [rw] row_count - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # [Deprecated] The count of rows in `serialized_record_batch`. - # Please use the format-independent ReadRowsResponse.row_count instead. - class ArrowRecordBatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains options specific to Arrow Serialization. - # @!attribute [rw] buffer_compression - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions::CompressionCodec] - # The compression codec to use for Arrow buffers in serialized record - # batches. - # @!attribute [rw] picos_timestamp_precision - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions::PicosTimestampPrecision] - # Optional. Set timestamp precision option. If not set, the default precision - # is microseconds. - class ArrowSerializationOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Compression codec's supported by Arrow. - module CompressionCodec - # If unspecified no compression will be used. - COMPRESSION_UNSPECIFIED = 0 - - # LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) - LZ4_FRAME = 1 - - # Zstandard compression. - ZSTD = 2 - end - - # The precision of the timestamp value in the Avro message. This precision - # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. - module PicosTimestampPrecision - # Unspecified timestamp precision. The default precision is microseconds. - PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 - - # Timestamp values returned by Read API will be truncated to microsecond - # level precision. The value will be encoded as Arrow TIMESTAMP type in a - # 64 bit integer. - TIMESTAMP_PRECISION_MICROS = 1 - - # Timestamp values returned by Read API will be truncated to nanosecond - # level precision. The value will be encoded as Arrow TIMESTAMP type in a - # 64 bit integer. - TIMESTAMP_PRECISION_NANOS = 2 - - # Read API will return full precision picosecond value. The value will be - # encoded as a string which conforms to ISO 8601 format. - TIMESTAMP_PRECISION_PICOS = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb deleted file mode 100644 index 8d583439b10a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - # Avro schema. - # @!attribute [rw] schema - # @return [::String] - # Json serialized schema, as described at - # https://avro.apache.org/docs/1.8.1/spec.html. - class AvroSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Avro rows. - # @!attribute [rw] serialized_binary_rows - # @return [::String] - # Binary serialized rows in a block. - # @!attribute [rw] row_count - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # [Deprecated] The count of rows in the returning block. - # Please use the format-independent ReadRowsResponse.row_count instead. - class AvroRows - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains options specific to Avro Serialization. - # @!attribute [rw] enable_display_name_attribute - # @return [::Boolean] - # Enable displayName attribute in Avro schema. - # - # The Avro specification requires field names to be alphanumeric. By - # default, in cases when column names do not conform to these requirements - # (e.g. non-ascii unicode codepoints) and Avro is requested as an output - # format, the CreateReadSession call will fail. - # - # Setting this field to true, populates avro field names with a placeholder - # value and populates a "displayName" attribute for every avro field with the - # original column name. - # @!attribute [rw] picos_timestamp_precision - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions::PicosTimestampPrecision] - # Optional. Set timestamp precision option. If not set, the default precision - # is microseconds. - class AvroSerializationOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The precision of the timestamp value in the Avro message. This precision - # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. - module PicosTimestampPrecision - # Unspecified timestamp precision. The default precision is microseconds. - PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 - - # Timestamp values returned by Read API will be truncated to microsecond - # level precision. The value will be encoded as Avro TIMESTAMP type in a - # 64 bit integer. - TIMESTAMP_PRECISION_MICROS = 1 - - # Timestamp values returned by Read API will be truncated to nanosecond - # level precision. The value will be encoded as Avro TIMESTAMP type in a - # 64 bit integer. - TIMESTAMP_PRECISION_NANOS = 2 - - # Read API will return full precision picosecond value. The value will be - # encoded as a string which conforms to ISO 8601 format. - TIMESTAMP_PRECISION_PICOS = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb deleted file mode 100644 index eb0828eb038c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - # ProtoSchema describes the schema of the serialized protocol buffer data rows. - # @!attribute [rw] proto_descriptor - # @return [::Google::Protobuf::DescriptorProto] - # Descriptor for input message. The provided descriptor must be self - # contained, such that data rows sent can be fully decoded using only the - # single descriptor. For data rows that are compositions of multiple - # independent messages, this means the descriptor may need to be transformed - # to only use nested types: - # https://developers.google.com/protocol-buffers/docs/proto#nested - # - # For additional information for how proto types and values map onto BigQuery - # see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - class ProtoSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] serialized_rows - # @return [::Array<::String>] - # A sequence of rows serialized as a Protocol Buffer. - # - # See https://developers.google.com/protocol-buffers/docs/overview for more - # information on deserializing this field. - class ProtoRows - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb deleted file mode 100644 index 01b68119dc9a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb +++ /dev/null @@ -1,697 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - # Request message for `CreateReadSession`. - # @!attribute [rw] parent - # @return [::String] - # Required. The request project that owns the session, in the form of - # `projects/{project_id}`. - # @!attribute [rw] read_session - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession] - # Required. Session to be created. - # @!attribute [rw] max_stream_count - # @return [::Integer] - # Max initial number of streams. If unset or zero, the server will - # provide a value of streams so as to produce reasonable throughput. Must be - # non-negative. The number of streams may be lower than the requested number, - # depending on the amount parallelism that is reasonable for the table. - # There is a default system max limit of 1,000. - # - # This must be greater than or equal to preferred_min_stream_count. - # Typically, clients should either leave this unset to let the system to - # determine an upper bound OR set this a size for the maximum "units of work" - # it can gracefully handle. - # @!attribute [rw] preferred_min_stream_count - # @return [::Integer] - # The minimum preferred stream count. This parameter can be used to inform - # the service that there is a desired lower bound on the number of streams. - # This is typically a target parallelism of the client (e.g. a Spark - # cluster with N-workers would set this to a low multiple of N to ensure - # good cluster utilization). - # - # The system will make a best effort to provide at least this number of - # streams, but in some cases might provide less. - class CreateReadSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `ReadRows`. - # @!attribute [rw] read_stream - # @return [::String] - # Required. Stream to read rows from. - # @!attribute [rw] offset - # @return [::Integer] - # The offset requested must be less than the last row read from Read. - # Requesting a larger offset is undefined. If not specified, start reading - # from offset zero. - # @!attribute [rw] arrow_serialization_options - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions] - # Optional. Options specific to the Apache Arrow output format. - # - # This feature is not yet available. - class ReadRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information on if the current connection is being throttled. - # @!attribute [rw] throttle_percent - # @return [::Integer] - # How much this connection is being throttled. Zero means no throttling, - # 100 means fully throttled. - class ThrottleState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Estimated stream statistics for a given read Stream. - # @!attribute [rw] progress - # @return [::Google::Cloud::Bigquery::Storage::V1::StreamStats::Progress] - # Represents the progress of the current stream. - class StreamStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] at_response_start - # @return [::Float] - # The fraction of rows assigned to the stream that have been processed by - # the server so far, not including the rows in the current response - # message. - # - # This value, along with `at_response_end`, can be used to interpolate - # the progress made as the rows in the message are being processed using - # the following formula: `at_response_start + (at_response_end - - # at_response_start) * rows_processed_from_response / rows_in_response`. - # - # Note that if a filter is provided, the `at_response_end` value of the - # previous response may not necessarily be equal to the - # `at_response_start` value of the current response. - # @!attribute [rw] at_response_end - # @return [::Float] - # Similar to `at_response_start`, except that this value includes the - # rows in the current response. - class Progress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response from calling `ReadRows` may include row data, progress and - # throttling information. - # @!attribute [rw] avro_rows - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroRows] - # Serialized row data in AVRO format. - # - # Note: The following fields are mutually exclusive: `avro_rows`, `arrow_record_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] arrow_record_batch - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowRecordBatch] - # Serialized row data in Arrow RecordBatch format. - # - # Note: The following fields are mutually exclusive: `arrow_record_batch`, `avro_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row_count - # @return [::Integer] - # Number of serialized rows in the rows block. - # @!attribute [rw] stats - # @return [::Google::Cloud::Bigquery::Storage::V1::StreamStats] - # Statistics for the stream. - # @!attribute [rw] throttle_state - # @return [::Google::Cloud::Bigquery::Storage::V1::ThrottleState] - # Throttling state. If unset, the latest response still describes - # the current throttling status. - # @!attribute [r] avro_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSchema] - # Output only. Avro schema. - # - # Note: The following fields are mutually exclusive: `avro_schema`, `arrow_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] arrow_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] - # Output only. Arrow schema. - # - # Note: The following fields are mutually exclusive: `arrow_schema`, `avro_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uncompressed_byte_size - # @return [::Integer] - # 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. - # @!attribute [r] total_estimated_row_count - # @return [::Integer] - # Output only. The total estimated number of rows in the query results. - # Only populated when reading data from a BigQuery job. - # - # This feature is not yet available. - class ReadRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `SplitReadStream`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the stream to split. - # @!attribute [rw] fraction - # @return [::Float] - # A value in the range (0.0, 1.0) that specifies the fractional point at - # which the original stream should be split. The actual split point is - # evaluated on pre-filtered rows, so if a filter is provided, then there is - # no guarantee that the division of the rows between the new child streams - # will be proportional to this fractional value. Additionally, because the - # server-side unit for assigning data is collections of rows, this fraction - # will always map to a data storage boundary on the server side. - class SplitReadStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `SplitReadStream`. - # @!attribute [rw] primary_stream - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadStream] - # Primary stream, which contains the beginning portion of - # |original_stream|. An empty value indicates that the original stream can no - # longer be split. - # @!attribute [rw] remainder_stream - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadStream] - # Remainder stream, which contains the tail of |original_stream|. An empty - # value indicates that the original stream can no longer be split. - class SplitReadStreamResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `CreateWriteStream`. - # @!attribute [rw] parent - # @return [::String] - # Required. Reference to the table to which the stream belongs, in the format - # of `projects/{project}/datasets/{dataset}/tables/{table}`. - # @!attribute [rw] write_stream - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # Required. Stream to be created. - class CreateWriteStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `AppendRows`. - # - # Because AppendRows is a bidirectional streaming RPC, certain parts of the - # AppendRowsRequest need only be specified for the first request before - # switching table destinations. You can also switch table destinations within - # the same connection for the default stream. - # - # The size of a single AppendRowsRequest must be less than 20 MB in size. - # Requests larger than this return an error, typically `INVALID_ARGUMENT`. - # @!attribute [rw] write_stream - # @return [::String] - # Required. The write_stream identifies the append operation. It must be - # provided in the following scenarios: - # - # * In the first request to an AppendRows connection. - # - # * In all subsequent requests to an AppendRows connection, if you use the - # same connection to write to multiple tables or change the input schema for - # default streams. - # - # For explicitly created write streams, the format is: - # - # * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - # - # For the special default stream, the format is: - # - # * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - # - # An example of a possible sequence of requests with write_stream fields - # within a single connection: - # - # * r1: \\{write_stream: stream_name_1} - # - # * r2: \\{write_stream: /*omit*/} - # - # * r3: \\{write_stream: /*omit*/} - # - # * r4: \\{write_stream: stream_name_2} - # - # * r5: \\{write_stream: stream_name_2} - # - # The destination changed in request_4, so the write_stream field must be - # populated in all subsequent requests in this stream. - # @!attribute [rw] offset - # @return [::Google::Protobuf::Int64Value] - # If present, the write is only performed if the next append offset is same - # as the provided value. If not present, the write is performed at the - # current end of stream. Specifying a value for this field is not allowed - # when calling AppendRows for the '_default' stream. - # @!attribute [rw] proto_rows - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData] - # Rows in proto format. - # - # Note: The following fields are mutually exclusive: `proto_rows`, `arrow_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] arrow_rows - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData] - # Rows in arrow format. - # - # Note: The following fields are mutually exclusive: `arrow_rows`, `proto_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] trace_id - # @return [::String] - # Id set by client to annotate its identity. Only initial request setting is - # respected. - # @!attribute [rw] missing_value_interpretations - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation}] - # A map to indicate how to interpret missing value for some fields. Missing - # values are fields present in user schema but missing in rows. The key is - # the field name. The value is the interpretation of missing values for the - # field. - # - # For example, a map \\{'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - # missing values in field foo are interpreted as NULL, all missing values in - # field bar are interpreted as the default value of field bar in table - # schema. - # - # If a field is not in this map and has missing values, the missing values - # in this field are interpreted as NULL. - # - # This field only applies to the current request, it won't affect other - # requests on the connection. - # - # Currently, field name can only be top-level column name, can't be a struct - # field path like 'foo.bar'. - # @!attribute [rw] default_missing_value_interpretation - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation] - # Optional. Default missing value interpretation for all columns in the - # table. When a value is specified on an `AppendRowsRequest`, it is applied - # to all requests from that point forward, until a subsequent - # `AppendRowsRequest` sets it to a different value. - # `missing_value_interpretation` can override - # `default_missing_value_interpretation`. For example, if you want to write - # `NULL` instead of using default values for some columns, you can set - # `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - # time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - # @!attribute [rw] client_stats - # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats] - # Optional. Stats and telemetry data gathered on the client side. - class AppendRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Arrow schema and data. - # @!attribute [rw] writer_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] - # Optional. Arrow Schema used to serialize the data. - # @!attribute [rw] rows - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowRecordBatch] - # Required. Serialized row data in Arrow format. - class ArrowData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ProtoData contains the data rows and schema when constructing append - # requests. - # @!attribute [rw] writer_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::ProtoSchema] - # Optional. The protocol buffer schema used to serialize the data. Provide - # this value whenever: - # - # * You send the first request of an RPC connection. - # - # * You change the input schema. - # - # * You specify a new destination table. - # @!attribute [rw] rows - # @return [::Google::Cloud::Bigquery::Storage::V1::ProtoRows] - # Required. Serialized row data in protobuf message format. - # Currently, the backend expects the serialized rows to adhere to - # proto2 semantics when appending rows, particularly with respect to - # how default values are encoded. - class ProtoData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation] - class MissingValueInterpretationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An enum to indicate how to interpret missing values of fields that are - # present in user schema but missing in rows. A missing value can represent a - # NULL or a column default value defined in BigQuery table schema. - module MissingValueInterpretation - # Invalid missing value interpretation. Requests with this value will be - # rejected. - MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0 - - # Missing value is interpreted as NULL. - NULL_VALUE = 1 - - # Missing value is interpreted as column default value if declared in the - # table schema, NULL otherwise. - DEFAULT_VALUE = 2 - end - end - - # Response message for `AppendRows`. - # @!attribute [rw] append_result - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse::AppendResult] - # Result if the append is successful. - # - # Note: The following fields are mutually exclusive: `append_result`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Error returned when problems were encountered. If present, - # it indicates rows were not accepted into the system. - # Users can retry or continue with other append requests within the - # same connection. - # - # Additional information about error signalling: - # - # ALREADY_EXISTS: Happens when an append specified an offset, and the - # backend already has received data at this offset. Typically encountered - # in retry scenarios, and can be ignored. - # - # OUT_OF_RANGE: Returned when the specified offset in the stream is beyond - # the current end of the stream. - # - # INVALID_ARGUMENT: Indicates a malformed request or data. - # - # ABORTED: Request processing is aborted because of prior failures. The - # request can be retried if previous failure is addressed. - # - # INTERNAL: Indicates server side error(s) that can be retried. - # - # Note: The following fields are mutually exclusive: `error`, `append_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] updated_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::TableSchema] - # If backend detects a schema update, pass it to user so that user can - # use it to input new type of message. It will be empty when no schema - # updates have occurred. - # @!attribute [rw] row_errors - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::RowError>] - # If a request failed due to corrupted rows, no rows in the batch will be - # appended. The API will return row level error info, so that the caller can - # remove the bad rows and retry the request. - # @!attribute [rw] write_stream - # @return [::String] - # The target of the append operation. Matches the write_stream in the - # corresponding request. - class AppendRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # AppendResult is returned for successful append requests. - # @!attribute [rw] offset - # @return [::Google::Protobuf::Int64Value] - # The row offset at which the last append occurred. The offset will not be - # set if appending using default streams. - class AppendResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for `GetWriteStreamRequest`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the stream to get, in the form of - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStreamView] - # Indicates whether to get full or partial view of the WriteStream. If - # not set, view returned will be basic. - class GetWriteStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `BatchCommitWriteStreams`. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent table that all the streams should belong to, in the form - # of `projects/{project}/datasets/{dataset}/tables/{table}`. - # @!attribute [rw] write_streams - # @return [::Array<::String>] - # Required. The group of streams that will be committed atomically. - class BatchCommitWriteStreamsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `BatchCommitWriteStreams`. - # @!attribute [rw] commit_time - # @return [::Google::Protobuf::Timestamp] - # The time at which streams were committed in microseconds granularity. - # This field will only exist when there are no stream errors. - # **Note** if this field is not set, it means the commit was not successful. - # @!attribute [rw] stream_errors - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::StorageError>] - # Stream level error if commit failed. Only streams with error will be in - # the list. - # If empty, there is no error and all streams are committed successfully. - # If non empty, certain streams have errors and ZERO stream is committed due - # to atomicity guarantee. - class BatchCommitWriteStreamsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for invoking `FinalizeWriteStream`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the stream to finalize, in the form of - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - class FinalizeWriteStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `FinalizeWriteStream`. - # @!attribute [rw] row_count - # @return [::Integer] - # Number of rows in the finalized stream. - class FinalizeWriteStreamResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `FlushRows`. - # @!attribute [rw] write_stream - # @return [::String] - # Required. The stream that is the target of the flush operation. - # @!attribute [rw] offset - # @return [::Google::Protobuf::Int64Value] - # Ending offset of the flush operation. Rows before this offset(including - # this offset) will be flushed. - class FlushRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Respond message for `FlushRows`. - # @!attribute [rw] offset - # @return [::Integer] - # The rows before this offset (including this offset) are flushed. - class FlushRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Structured custom BigQuery Storage error message. The error can be attached - # as error details in the returned rpc Status. In particular, the use of error - # codes allows more structured error handling, and reduces the need to evaluate - # unstructured error text strings. - # @!attribute [rw] code - # @return [::Google::Cloud::Bigquery::Storage::V1::StorageError::StorageErrorCode] - # BigQuery Storage specific error code. - # @!attribute [rw] entity - # @return [::String] - # Name of the failed entity. - # @!attribute [rw] error_message - # @return [::String] - # Message that describes the error. - class StorageError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error code for `StorageError`. - module StorageErrorCode - # Default error. - STORAGE_ERROR_CODE_UNSPECIFIED = 0 - - # Table is not found in the system. - TABLE_NOT_FOUND = 1 - - # Stream is already committed. - STREAM_ALREADY_COMMITTED = 2 - - # Stream is not found. - STREAM_NOT_FOUND = 3 - - # Invalid Stream type. - # For example, you try to commit a stream that is not pending. - INVALID_STREAM_TYPE = 4 - - # Invalid Stream state. - # For example, you try to commit a stream that is not finalized or is - # garbaged. - INVALID_STREAM_STATE = 5 - - # Stream is finalized. - STREAM_FINALIZED = 6 - - # There is a schema mismatch and it is caused by user schema has extra - # field than bigquery schema. - SCHEMA_MISMATCH_EXTRA_FIELDS = 7 - - # Offset already exists. - OFFSET_ALREADY_EXISTS = 8 - - # Offset out of range. - OFFSET_OUT_OF_RANGE = 9 - - # Customer-managed encryption key (CMEK) not provided for CMEK-enabled - # data. - CMEK_NOT_PROVIDED = 10 - - # Customer-managed encryption key (CMEK) was incorrectly provided. - INVALID_CMEK_PROVIDED = 11 - - # There is an encryption error while using customer-managed encryption key. - CMEK_ENCRYPTION_ERROR = 12 - - # Key Management Service (KMS) service returned an error, which can be - # retried. - KMS_SERVICE_ERROR = 13 - - # Permission denied while using customer-managed encryption key. - KMS_PERMISSION_DENIED = 14 - end - end - - # The message that presents row level error info in a request. - # @!attribute [rw] index - # @return [::Integer] - # Index of the malformed row in the request. - # @!attribute [rw] code - # @return [::Google::Cloud::Bigquery::Storage::V1::RowError::RowErrorCode] - # Structured error reason for a row error. - # @!attribute [rw] message - # @return [::String] - # Description of the issue encountered when processing the row. - class RowError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error code for `RowError`. - module RowErrorCode - # Default error. - ROW_ERROR_CODE_UNSPECIFIED = 0 - - # One or more fields in the row has errors. - FIELDS_ERROR = 1 - end - end - - # Stats and telemetry data gathered on the client side about requests - # being sent to the BigQuery Storage service, for internal use only. - # @!attribute [rw] request_stats - # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats::RequestStats] - # Optional. Per-request stats. - # @!attribute [rw] window_stats - # @return [::Google::Cloud::Bigquery::Storage::V1::ClientStats::WindowStats] - # Optional. Windowed stats. - class ClientStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stats and telemetry data gathered on the client side about a single - # request. - # @!attribute [rw] send_time_millis - # @return [::Integer] - # Optional. Timestamp indicating when the request was sent over the - # network, expressed in epoch milliseconds. - # @!attribute [rw] queued_requests_count - # @return [::Integer] - # Optional. Number of pending requests at the moment this request was sent. - # This includes requests waiting to be sent, and those that are inflight. - class RequestStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Aggregate connection metrics over a window interval. - # @!attribute [rw] max_response_latency_millis - # @return [::Integer] - # Optional. The maximum response latency observed in the window, expressed - # in milliseconds. - # @!attribute [rw] avg_response_latency_millis - # @return [::Integer] - # Optional. The average response latency observed in the window, expressed - # in milliseconds. - # @!attribute [rw] longest_wait_no_response_millis - # @return [::Integer] - # Optional. The longest time spent waiting without receiving a response in - # the window. This could exceed max_response_latency_millis because the - # latter is evaluated only when a response is received. Expressed in - # milliseconds. - # @!attribute [rw] requests_sent_count - # @return [::Integer] - # Optional. How many requests were sent in the window. - # @!attribute [rw] responses_received_count - # @return [::Integer] - # Optional. How many responses were received in the window. - # @!attribute [rw] bytes_sent_count - # @return [::Integer] - # Optional. How many bytes were sent in the window. - # @!attribute [rw] window_start_time_epoch_millis - # @return [::Integer] - # Optional. Start time of the window interval for which these stats are - # aggregated, expressed in epoch milliseconds. - # @!attribute [rw] window_millis - # @return [::Integer] - # Optional. Duration of the window interval for which these stats are - # aggregated, expressed in milliseconds. - class WindowStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb deleted file mode 100644 index a9d8230c0a6c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb +++ /dev/null @@ -1,321 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - # Information about the ReadSession. - # @!attribute [r] name - # @return [::String] - # Output only. Unique identifier for the session, in the form - # `projects/{project_id}/locations/{location}/sessions/{session_id}`. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time at which the session becomes invalid. After this time, - # subsequent requests to read this Session will return errors. The - # expire_time is automatically assigned and currently cannot be specified or - # updated. - # @!attribute [rw] data_format - # @return [::Google::Cloud::Bigquery::Storage::V1::DataFormat] - # Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - # supported. - # @!attribute [r] avro_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSchema] - # Output only. Avro schema. - # - # Note: The following fields are mutually exclusive: `avro_schema`, `arrow_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] arrow_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] - # Output only. Arrow schema. - # - # Note: The following fields are mutually exclusive: `arrow_schema`, `avro_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] table - # @return [::String] - # Immutable. Table that this ReadSession is reading from, in the form - # `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - # @!attribute [rw] table_modifiers - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableModifiers] - # Optional. Any modifiers which are applied when reading from the specified - # table. - # @!attribute [rw] read_options - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions] - # Optional. Read options for this session (e.g. column selection, filters). - # @!attribute [r] streams - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::ReadStream>] - # Output only. A list of streams created with the session. - # - # At least one stream is created with the session. In the future, larger - # request_stream_count values *may* result in this list being unpopulated, - # in that case, the user will need to use a List method to get the streams - # instead, which is not yet available. - # @!attribute [r] estimated_total_bytes_scanned - # @return [::Integer] - # Output only. An estimate on the number of bytes this session will scan when - # all streams are completely consumed. This estimate is based on - # metadata from the table which might be incomplete or stale. - # @!attribute [r] estimated_total_physical_file_size - # @return [::Integer] - # Output only. A pre-projected estimate of the total physical size of files - # (in bytes) that this session will scan when all streams are consumed. This - # estimate is independent of the selected columns and can be based on - # incomplete or stale metadata from the table. This field is only set for - # BigLake tables. - # @!attribute [r] estimated_row_count - # @return [::Integer] - # Output only. An estimate on the number of rows present in this session's - # streams. This estimate is based on metadata from the table which might be - # incomplete or stale. - # @!attribute [rw] trace_id - # @return [::String] - # Optional. ID set by client to annotate a session identity. This does not - # need to be strictly unique, but instead the same ID should be used to group - # logically connected sessions (e.g. All using the same ID for all sessions - # needed to complete a Spark SQL query is reasonable). - # - # Maximum length is 256 bytes. - class ReadSession - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional attributes when reading a table. - # @!attribute [rw] snapshot_time - # @return [::Google::Protobuf::Timestamp] - # The snapshot time of the table. If not set, interpreted as now. - class TableModifiers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options dictating how we read a table. - # @!attribute [rw] selected_fields - # @return [::Array<::String>] - # 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. - # - # Nested fields -- the child elements of a STRUCT field -- can be selected - # individually using their fully-qualified names, and will be returned as - # record fields containing only the selected nested fields. If a STRUCT - # field is specified in the selected fields list, all of the child elements - # will be returned. - # - # As an example, consider a table with the following schema: - # - # { - # "name": "struct_field", - # "type": "RECORD", - # "mode": "NULLABLE", - # "fields": [ - # { - # "name": "string_field1", - # "type": "STRING", - # . "mode": "NULLABLE" - # }, - # { - # "name": "string_field2", - # "type": "STRING", - # "mode": "NULLABLE" - # } - # ] - # } - # - # Specifying "struct_field" in the selected fields list will result in a - # read session schema with the following logical structure: - # - # struct_field { - # string_field1 - # string_field2 - # } - # - # Specifying "struct_field.string_field1" in the selected fields list will - # result in a read session schema with the following logical structure: - # - # struct_field { - # string_field1 - # } - # - # The order of the fields in the read session schema is derived from the - # table schema and does not correspond to the order in which the fields are - # specified in this list. - # @!attribute [rw] row_restriction - # @return [::String] - # SQL text filtering statement, similar to a WHERE clause in a query. - # Aggregates are not supported. - # - # Examples: "int_field > 5" - # "date_field = CAST('2014-9-27' as DATE)" - # "nullable_field is not NULL" - # "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - # "numeric_field BETWEEN 1.0 AND 5.0" - # - # Restricted to a maximum length for 1 MB. - # @!attribute [rw] arrow_serialization_options - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions] - # Optional. Options specific to the Apache Arrow output format. - # - # Note: The following fields are mutually exclusive: `arrow_serialization_options`, `avro_serialization_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] avro_serialization_options - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions] - # Optional. Options specific to the Apache Avro output format - # - # Note: The following fields are mutually exclusive: `avro_serialization_options`, `arrow_serialization_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sample_percentage - # @return [::Float] - # Optional. Specifies a table sampling percentage. Specifically, the query - # planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - # sampling percentage is applied at the data block granularity. It will - # randomly choose for each data block whether to read the rows in that data - # block. For more details, see - # https://cloud.google.com/bigquery/docs/table-sampling) - # @!attribute [rw] response_compression_codec - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions::ResponseCompressionCodec] - # Optional. Set response_compression_codec when creating a read session to - # enable application-level compression of ReadRows responses. - class TableReadOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # 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. - module ResponseCompressionCodec - # Default is no compression. - RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0 - - # Use raw LZ4 compression. - RESPONSE_COMPRESSION_CODEC_LZ4 = 2 - end - end - end - - # Information about a single stream that gets data out of the storage system. - # Most of the information about `ReadStream` instances is aggregated, making - # `ReadStream` lightweight. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the stream, in the form - # `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - class ReadStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about a single stream that gets data inside the storage system. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the stream, in the form - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream::Type] - # Immutable. Type of the stream. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time of the stream. For the _default stream, this is - # the creation_time of the table. - # @!attribute [r] commit_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Commit time of the stream. - # If a stream is of `COMMITTED` type, then it will have a commit_time same as - # `create_time`. If the stream is of `PENDING` type, empty commit_time - # means it is not committed. - # @!attribute [r] table_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::TableSchema] - # Output only. The schema of the destination table. It is only returned in - # `CreateWriteStream` response. Caller should generate data that's - # compatible with this schema to send in initial `AppendRowsRequest`. - # The table schema could go out of date during the life time of the stream. - # @!attribute [rw] write_mode - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream::WriteMode] - # Immutable. Mode of the stream. - # @!attribute [r] location - # @return [::String] - # Output only. The geographic location where the stream's dataset resides. - # See https://cloud.google.com/bigquery/docs/locations for supported - # locations. - class WriteStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type enum of the stream. - module Type - # Unknown type. - TYPE_UNSPECIFIED = 0 - - # Data will commit automatically and appear as soon as the write is - # acknowledged. - COMMITTED = 1 - - # Data is invisible until the stream is committed. - PENDING = 2 - - # Data is only visible up to the offset to which it was flushed. - BUFFERED = 3 - end - - # Mode enum of the stream. - module WriteMode - # Unknown type. - WRITE_MODE_UNSPECIFIED = 0 - - # Insert new records into the table. - # It is the default value if customers do not specify it. - INSERT = 1 - end - end - - # Data format for input or output data. - module DataFormat - # Data format is unspecified. - DATA_FORMAT_UNSPECIFIED = 0 - - # Avro is a standard open source row based file format. - # See https://avro.apache.org/ for more details. - AVRO = 1 - - # Arrow is a standard open source column-based message format. - # See https://arrow.apache.org/ for more details. - ARROW = 2 - end - - # WriteStreamView is a view enum that controls what details about a write - # stream should be returned. - module WriteStreamView - # The default / unset value. - WRITE_STREAM_VIEW_UNSPECIFIED = 0 - - # The BASIC projection returns basic metadata about a write stream. The - # basic view does not include schema information. This is the default view - # returned by GetWriteStream. - BASIC = 1 - - # The FULL projection returns all available write stream metadata, including - # the schema. CreateWriteStream returns the full projection of write stream - # metadata. - FULL = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb deleted file mode 100644 index a014f79dc9d7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - # Schema of a table. This schema is a subset of - # google.cloud.bigquery.v2.TableSchema containing information necessary to - # generate valid message to write to BigQuery. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>] - # Describes the fields in a table. - class TableSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # TableFieldSchema defines a single field/column within a table schema. - # @!attribute [rw] name - # @return [::String] - # 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. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] - # Required. The field data type. - # @!attribute [rw] mode - # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Mode] - # Optional. The field mode. The default value is NULLABLE. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>] - # Optional. Describes the nested schema fields if the type property is set to - # STRUCT. - # @!attribute [rw] description - # @return [::String] - # Optional. The field description. The maximum length is 1,024 characters. - # @!attribute [rw] max_length - # @return [::Integer] - # Optional. Maximum length of values of this field for STRINGS or BYTES. - # - # If max_length is not specified, no maximum length constraint is imposed - # on this field. - # - # If type = "STRING", then max_length represents the maximum UTF-8 - # length of strings in this field. - # - # If type = "BYTES", then max_length represents the maximum number of - # bytes in this field. - # - # It is invalid to set this field if type is not "STRING" or "BYTES". - # @!attribute [rw] precision - # @return [::Integer] - # Optional. Precision (maximum number of total digits in base 10) and scale - # (maximum number of digits in the fractional part in base 10) constraints - # for values of this field for NUMERIC or BIGNUMERIC. - # - # It is invalid to set precision or scale if type is not "NUMERIC" or - # "BIGNUMERIC". - # - # If precision and scale are not specified, no value range constraint is - # imposed on this field insofar as values are permitted by the type. - # - # Values of this NUMERIC or BIGNUMERIC field must be in this range when: - # - # * Precision (P) and scale (S) are specified: - # [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - # * Precision (P) is specified but not scale (and thus scale is - # interpreted to be equal to zero): - # [-10^P + 1, 10^P - 1]. - # - # Acceptable values for precision and scale if both are specified: - # - # * If type = "NUMERIC": - # 1 <= precision - scale <= 29 and 0 <= scale <= 9. - # * If type = "BIGNUMERIC": - # 1 <= precision - scale <= 38 and 0 <= scale <= 38. - # - # Acceptable values for precision if only precision is specified but not - # scale (and thus scale is interpreted to be equal to zero): - # - # * If type = "NUMERIC": 1 <= precision <= 29. - # * If type = "BIGNUMERIC": 1 <= precision <= 38. - # - # If scale is specified but not precision, then it is invalid. - # @!attribute [rw] scale - # @return [::Integer] - # Optional. See documentation for precision. - # @!attribute [rw] default_value_expression - # @return [::String] - # Optional. A SQL expression to specify the [default value] - # (https://cloud.google.com/bigquery/docs/default-values) for this field. - # @!attribute [rw] timestamp_precision - # @return [::Google::Protobuf::Int64Value] - # Optional. Precision (maximum number of total digits in base 10) for seconds - # of TIMESTAMP type. - # - # Possible values include: - # - # * 6 (Default, for TIMESTAMP type with microsecond precision) - # * 12 (For TIMESTAMP type with picosecond precision) - # @!attribute [rw] range_element_type - # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::FieldElementType] - # 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 - class TableFieldSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the type of a field element. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] - # Required. The type of a field element. - class FieldElementType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module Type - # Illegal value - TYPE_UNSPECIFIED = 0 - - # 64K, UTF8 - STRING = 1 - - # 64-bit signed - INT64 = 2 - - # 64-bit IEEE floating point - DOUBLE = 3 - - # Aggregate type - STRUCT = 4 - - # 64K, Binary - BYTES = 5 - - # 2-valued - BOOL = 6 - - # 64-bit signed usec since UTC epoch - TIMESTAMP = 7 - - # Civil date - Year, Month, Day - DATE = 8 - - # Civil time - Hour, Minute, Second, Microseconds - TIME = 9 - - # Combination of civil date and civil time - DATETIME = 10 - - # Geography object - GEOGRAPHY = 11 - - # Numeric value - NUMERIC = 12 - - # BigNumeric value - BIGNUMERIC = 13 - - # Interval - INTERVAL = 14 - - # JSON, String - JSON = 15 - - # RANGE - RANGE = 16 - end - - module Mode - # Illegal value - MODE_UNSPECIFIED = 0 - - NULLABLE = 1 - - REQUIRED = 2 - - REPEATED = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module 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); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # 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 := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(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": , - # "lastName": - # } - # - # 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" - # } - # @!attribute [rw] type_url - # @return [::String] - # 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. 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. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module 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". - # @!attribute [rw] seconds - # @return [::Integer] - # 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 - # @!attribute [rw] nanos - # @return [::Integer] - # 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. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module 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 Java `Instant.now()`. - # - # 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() - # - # # 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://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # 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. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # Wrapper message for `double`. - # - # 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. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # 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. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # 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. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # 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. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # 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. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # 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. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # 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. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # 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. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # 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. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # 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). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # 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. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile deleted file mode 100644 index 3ec30152a26d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-storage-v1", path: "../" -else - gem "google-cloud-bigquery-storage-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb deleted file mode 100644 index 97d4edfc8251..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the create_read_session call in the BigQueryRead service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session. -# -def create_read_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new - - # Call the create_read_session method. - result = client.create_read_session request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession. - p result -end -# [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb deleted file mode 100644 index a10ecf50c1c7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the read_rows call in the BigQueryRead service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows. -# -def read_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new - - # Call the read_rows method to start streaming. - output = client.read_rows request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse - output.each do |current_response| - p current_response - end -end -# [END bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb deleted file mode 100644 index f0a8033cec49..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the split_read_stream call in the BigQueryRead service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream. -# -def split_read_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new - - # Call the split_read_stream method. - result = client.split_read_stream request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse. - p result -end -# [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb deleted file mode 100644 index 291fbc8d14ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the append_rows call in the BigQueryWrite service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows. -# -def append_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the append_rows method to start streaming. - output = client.append_rows input - - # Send requests on the stream. For each request object, set fields by - # passing keyword arguments. Be sure to close the stream when done. - input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new - input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse - output.each do |current_response| - p current_response - end -end -# [END bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb deleted file mode 100644 index c7e6925c2f99..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the batch_commit_write_streams call in the BigQueryWrite service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams. -# -def batch_commit_write_streams - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new - - # Call the batch_commit_write_streams method. - result = client.batch_commit_write_streams request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb deleted file mode 100644 index ad3883cf57b1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the create_write_stream call in the BigQueryWrite service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream. -# -def create_write_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new - - # Call the create_write_stream method. - result = client.create_write_stream request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb deleted file mode 100644 index a8f857e48124..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the finalize_write_stream call in the BigQueryWrite service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream. -# -def finalize_write_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new - - # Call the finalize_write_stream method. - result = client.finalize_write_stream request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb deleted file mode 100644 index 47533a19a759..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the flush_rows call in the BigQueryWrite service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows. -# -def flush_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new - - # Call the flush_rows method. - result = client.flush_rows request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb deleted file mode 100644 index a30ea12d7684..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the get_write_stream call in the BigQueryWrite service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream. -# -def get_write_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new - - # Call the get_write_stream method. - result = client.get_write_stream request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json deleted file mode 100644 index b6c6f418de1d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json +++ /dev/null @@ -1,375 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-storage-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.storage.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync", - "title": "Snippet for the create_read_session call in the BigQueryRead service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session.", - "file": "big_query_read/create_read_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_read_session", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::ReadSession", - "client": { - "short_name": "BigQueryRead::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" - }, - "method": { - "short_name": "CreateReadSession", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.CreateReadSession", - "service": { - "short_name": "BigQueryRead", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync", - "title": "Snippet for the read_rows call in the BigQueryRead service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows.", - "file": "big_query_read/read_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "read_rows", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse", - "client": { - "short_name": "BigQueryRead::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" - }, - "method": { - "short_name": "ReadRows", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.ReadRows", - "service": { - "short_name": "BigQueryRead", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync", - "title": "Snippet for the split_read_stream call in the BigQueryRead service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream.", - "file": "big_query_read/split_read_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "split_read_stream", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse", - "client": { - "short_name": "BigQueryRead::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" - }, - "method": { - "short_name": "SplitReadStream", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.SplitReadStream", - "service": { - "short_name": "BigQueryRead", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync", - "title": "Snippet for the create_write_stream call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream.", - "file": "big_query_write/create_write_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_write_stream", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::WriteStream", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "CreateWriteStream", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.CreateWriteStream", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync", - "title": "Snippet for the append_rows call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows.", - "file": "big_query_write/append_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "append_rows", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "AppendRows", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.AppendRows", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync", - "title": "Snippet for the get_write_stream call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream.", - "file": "big_query_write/get_write_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_write_stream", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::WriteStream", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "GetWriteStream", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.GetWriteStream", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync", - "title": "Snippet for the finalize_write_stream call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream.", - "file": "big_query_write/finalize_write_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "finalize_write_stream", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "FinalizeWriteStream", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.FinalizeWriteStream", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync", - "title": "Snippet for the batch_commit_write_streams call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams.", - "file": "big_query_write/batch_commit_write_streams.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_commit_write_streams", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "BatchCommitWriteStreams", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.BatchCommitWriteStreams", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync", - "title": "Snippet for the flush_rows call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows.", - "file": "big_query_write/flush_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "flush_rows", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "FlushRows", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.FlushRows", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb deleted file mode 100644 index 87827e1ac024..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/storage/v1/big_query_read" - -class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_read_session_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.read_session_path project: "value0", location: "value1", session: "value2" - assert_equal "projects/value0/locations/value1/sessions/value2", path - end - end - - def test_read_stream_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.read_stream_path project: "value0", location: "value1", session: "value2", stream: "value3" - assert_equal "projects/value0/locations/value1/sessions/value2/streams/value3", path - end - end - - def test_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_path project: "value0", dataset: "value1", table: "value2" - assert_equal "projects/value0/datasets/value1/tables/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb deleted file mode 100644 index 7f67d1586d09..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb +++ /dev/null @@ -1,306 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/storage/v1/storage_pb" -require "google/cloud/bigquery/storage/v1/big_query_read" - -class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_read_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::ReadSession.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_session = {} - max_stream_count = 42 - preferred_min_stream_count = 42 - - create_read_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_read_session, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ReadSession), request["read_session"] - assert_equal 42, request["max_stream_count"] - assert_equal 42, request["preferred_min_stream_count"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_read_session_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_read_session({ parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_read_session parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_read_session ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new(parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_read_session({ parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_read_session(::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new(parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_read_session_client_stub.call_rpc_count - end - end - - def test_read_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - read_stream = "hello world" - offset = 42 - arrow_serialization_options = {} - - read_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :read_rows, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, request - assert_equal "hello world", request["read_stream"] - assert_equal 42, request["offset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions), request["arrow_serialization_options"] - assert_equal :arrow_serialization_options, request.output_format_serialization_options - refute_nil options - end - - Gapic::ServiceStub.stub :new, read_rows_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.read_rows({ read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - c.read_rows read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.read_rows ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.read_rows({ read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.read_rows(::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset, arrow_serialization_options: arrow_serialization_options), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, read_rows_client_stub.call_rpc_count - end - end - - def test_split_read_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - fraction = 3.5 - - split_read_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :split_read_stream, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, request - assert_equal "hello world", request["name"] - assert_equal 3.5, request["fraction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, split_read_stream_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.split_read_stream({ name: name, fraction: fraction }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.split_read_stream name: name, fraction: fraction do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.split_read_stream ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new(name: name, fraction: fraction) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.split_read_stream({ name: name, fraction: fraction }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.split_read_stream(::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new(name: name, fraction: fraction), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, split_read_stream_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb deleted file mode 100644 index aeeebb7c4e2d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/storage/v1/big_query_write" - -class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_path project: "value0", dataset: "value1", table: "value2" - assert_equal "projects/value0/datasets/value1/tables/value2", path - end - end - - def test_write_stream_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.write_stream_path project: "value0", dataset: "value1", table: "value2", stream: "value3" - assert_equal "projects/value0/datasets/value1/tables/value2/streams/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb deleted file mode 100644 index 1f6731d962f6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb +++ /dev/null @@ -1,503 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/storage/v1/storage_pb" -require "google/cloud/bigquery/storage/v1/big_query_write" - -class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_write_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::WriteStream.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - write_stream = {} - - create_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_write_stream, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::WriteStream), request["write_stream"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_write_stream_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_write_stream({ parent: parent, write_stream: write_stream }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_write_stream parent: parent, write_stream: write_stream do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_write_stream ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new(parent: parent, write_stream: write_stream) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_write_stream({ parent: parent, write_stream: write_stream }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_write_stream(::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new(parent: parent, write_stream: write_stream), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_write_stream_client_stub.call_rpc_count - end - end - - def test_append_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a bidi streaming method. - write_stream = "hello world" - offset = {} - proto_rows = {} - trace_id = "hello world" - missing_value_interpretations = {} - default_missing_value_interpretation = :MISSING_VALUE_INTERPRETATION_UNSPECIFIED - client_stats = {} - - append_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :append_rows, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, append_rows_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats - enum_input = [request_hash, request_proto].to_enum - c.append_rows enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats - stream_input = Gapic::StreamInput.new - c.append_rows stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Use enumerable object with hash and protobuf object with options. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats - enum_input = [request_hash, request_proto].to_enum - c.append_rows enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation, client_stats: client_stats - stream_input = Gapic::StreamInput.new - c.append_rows stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Verify method calls - assert_equal 4, append_rows_client_stub.call_rpc_count - append_rows_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest, r - assert_equal "hello world", r["write_stream"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int64Value), r["offset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData), r["proto_rows"] - assert_equal :proto_rows, r.rows - assert_equal "hello world", r["trace_id"] - assert_equal({}, r["missing_value_interpretations"].to_h) - assert_equal :MISSING_VALUE_INTERPRETATION_UNSPECIFIED, r["default_missing_value_interpretation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ClientStats), r["client_stats"] - end - end - end - end - - def test_get_write_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::WriteStream.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :WRITE_STREAM_VIEW_UNSPECIFIED - - get_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_write_stream, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, request - assert_equal "hello world", request["name"] - assert_equal :WRITE_STREAM_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_write_stream_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_write_stream({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_write_stream name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_write_stream ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_write_stream({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_write_stream(::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_write_stream_client_stub.call_rpc_count - end - end - - def test_finalize_write_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - finalize_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :finalize_write_stream, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, finalize_write_stream_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.finalize_write_stream({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.finalize_write_stream name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.finalize_write_stream ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.finalize_write_stream({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.finalize_write_stream(::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, finalize_write_stream_client_stub.call_rpc_count - end - end - - def test_batch_commit_write_streams - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - write_streams = ["hello world"] - - batch_commit_write_streams_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_commit_write_streams, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["write_streams"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_commit_write_streams_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_commit_write_streams({ parent: parent, write_streams: write_streams }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_commit_write_streams parent: parent, write_streams: write_streams do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_commit_write_streams ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new(parent: parent, write_streams: write_streams) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_commit_write_streams({ parent: parent, write_streams: write_streams }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_commit_write_streams(::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new(parent: parent, write_streams: write_streams), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_commit_write_streams_client_stub.call_rpc_count - end - end - - def test_flush_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - write_stream = "hello world" - offset = {} - - flush_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :flush_rows, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, request - assert_equal "hello world", request["write_stream"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int64Value), request["offset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, flush_rows_client_stub do - # Create client - c = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.flush_rows({ write_stream: write_stream, offset: offset }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.flush_rows write_stream: write_stream, offset: offset do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.flush_rows ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new(write_stream: write_stream, offset: offset) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.flush_rows({ write_stream: write_stream, offset: offset }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.flush_rows(::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new(write_stream: write_stream, offset: offset), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, flush_rows_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 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 -# -# https://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. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"