From 59a1e2a565518b0b21c3b030803cea01c930ce96 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 20 May 2026 20:06:21 +0000 Subject: [PATCH 1/2] feat: add support for assessment tasks in BigQuery Migration API feat: add suggestion config to translation tasks docs: update comments for various fields in MigrationWorkflow, MigrationTask, and MigrationSubtask docs: Add comment that field `create_time` in message `.google.cloud.bigquery.migration.v2.MigrationWorkflow` is output only docs: Add comment that field `last_update_time` in message `.google.cloud.bigquery.migration.v2.MigrationWorkflow` is output only docs: Fixed typo in comment for enum value `PAUSED` in enum `State` is changed docs: Link to relevant documentation in comment for field `type` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is changed docs: Add comment that field `create_time` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `last_update_time` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `resource_error_count` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `metrics` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `total_processing_error_count` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `total_resource_error_count` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `resource_error_count` in message `.google.cloud.bigquery.migration.v2.MigrationSubtask` is output only docs: Add comment that field `create_time` in message `.google.cloud.bigquery.migration.v2.MigrationSubtask` is output only docs: Add comment that field `last_update_time` in message `.google.cloud.bigquery.migration.v2.MigrationSubtask` is output only docs: Add comment for field `metrics` in message `.google.cloud.bigquery.migration.v2.MigrationSubtask` is output only PiperOrigin-RevId: 918496010 Source-Link: https://github.com/googleapis/googleapis/commit/43731d5d22f8e3526ba7aa708da9d5de26043d0f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1a8cf1fa69363ffbfca334d355c8a453d6eb5665 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LW1pZ3JhdGlvbi12Mi8uT3dsQm90LnlhbWwiLCJoIjoiMWE4Y2YxZmE2OTM2M2ZmYmZjYTMzNGQzNTVjOGE0NTNkNmViNTY2NSJ9 --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 +++ .../README.md | 154 +++ .../Rakefile | 169 +++ .../gapic_metadata.json | 53 + ...google-cloud-bigquery-migration-v2.gemspec | 28 + .../lib/google-cloud-bigquery-migration-v2.rb | 21 + .../lib/google/cloud/bigquery/migration/v2.rb | 47 + .../migration/v2/assessment_task_pb.rb | 26 + .../migration/v2/migration_entities_pb.rb | 41 + .../v2/migration_error_details_pb.rb | 28 + .../migration/v2/migration_metrics_pb.rb | 31 + .../migration/v2/migration_service.rb | 57 + .../migration/v2/migration_service/client.rb | 1101 +++++++++++++++++ .../v2/migration_service/credentials.rb | 49 + .../migration/v2/migration_service/paths.rb | 92 ++ .../migration/v2/migration_service/rest.rb | 54 + .../v2/migration_service/rest/client.rb | 1009 +++++++++++++++ .../v2/migration_service/rest/service_stub.rb | 512 ++++++++ .../migration/v2/migration_service_pb.rb | 39 + .../v2/migration_service_services_pb.rb | 62 + .../cloud/bigquery/migration/v2/rest.rb | 39 + .../migration/v2/translation_config_pb.rb | 50 + .../migration/v2/translation_details_pb.rb | 34 + .../migration/v2/translation_suggestion_pb.rb | 27 + .../migration/v2/translation_usability_pb.rb | 26 + .../cloud/bigquery/migration/v2/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++++++++ .../proto_docs/google/api/distribution.rb | 233 ++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/label.rb | 49 + .../proto_docs/google/api/launch_stage.rb | 71 ++ .../proto_docs/google/api/metric.rb | 299 +++++ .../proto_docs/google/api/resource.rb | 227 ++++ .../bigquery/migration/v2/assessment_task.rb | 61 + .../migration/v2/migration_entities.rb | 297 +++++ .../migration/v2/migration_error_details.rb | 72 ++ .../migration/v2/migration_metrics.rb | 129 ++ .../migration/v2/migration_service.rb | 166 +++ .../migration/v2/translation_config.rb | 389 ++++++ .../migration/v2/translation_details.rb | 191 +++ .../migration/v2/translation_suggestion.rb | 67 + .../migration/v2/translation_usability.rb | 69 ++ .../proto_docs/google/protobuf/any.rb | 145 +++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++++ .../proto_docs/google/protobuf/timestamp.rb | 127 ++ .../proto_docs/google/rpc/error_details.rb | 420 +++++++ .../snippets/Gemfile | 32 + .../create_migration_workflow.rb | 47 + .../delete_migration_workflow.rb | 47 + .../get_migration_subtask.rb | 47 + .../get_migration_workflow.rb | 47 + .../list_migration_subtasks.rb | 51 + .../list_migration_workflows.rb | 51 + .../start_migration_workflow.rb | 47 + ...ta_google.cloud.bigquery.migration.v2.json | 295 +++++ .../v2/migration_service_paths_test.rb | 79 ++ .../v2/migration_service_rest_test.rb | 487 ++++++++ .../migration/v2/migration_service_test.rb | 540 ++++++++ .../test/helper.rb | 26 + 70 files changed, 10081 insertions(+) create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_error_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_metrics_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore b/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +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-migration-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json new file mode 100644 index 000000000000..519979303a46 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "bigquerymigration.googleapis.com", + "api_shortname": "bigquerymigration", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest", + "distribution_name": "google-cloud-bigquery-migration-v2", + "is_cloud": true, + "language": "ruby", + "name": "bigquerymigration", + "name_pretty": "BigQuery Migration V2 API", + "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/migration-intro", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml new file mode 100644 index 000000000000..57be07ac546b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-migration-v2.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-migration-v2.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.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-migration-v2/.yardopts b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts new file mode 100644 index 000000000000..e1a4dd51c1ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Migration V2 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-migration-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..49431cec3789 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-migration-v2 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-migration-v2 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/migration/v2" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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/migration/v2" + +::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-migration-v2 +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/migration/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-migration-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile @@ -0,0 +1,14 @@ +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-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-migration-v2/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md new file mode 100644 index 000000000000..1b3d10929b14 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Migration V2 API + +The migration service, exposing apis for migration jobs operations, and agent management. + +The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. + +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 Migration V2 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-migration](https://rubygems.org/gems/google-cloud-bigquery-migration). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-migration-v2 +``` + +## 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/bigquerymigration.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/migration/v2" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new +request = ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new # (request fields as keyword arguments...) +response = client.create_migration_workflow request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs/migration-intro) +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/migration/v2" +require "logger" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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.0+. + +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-migration`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-migration-v2`. +_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-migration`. +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-migration-v2`. + +### 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-migration-v2/Rakefile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile new file mode 100644 index 000000000000..22b1470bce3b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_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 GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/migration/v2/migration_service/credentials" + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_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-migration-v2 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-migration-v2 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-migration-v2 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-migration-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-migration-v2" + header "google-cloud-bigquery-migration-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-migration-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-migration-v2 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-migration-v2 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-migration-v2 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-migration-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json new file mode 100644 index 000000000000..da3bd8bcce33 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.migration.v2", + "libraryPackage": "::Google::Cloud::Bigquery::Migration::V2", + "services": { + "MigrationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client", + "rpcs": { + "CreateMigrationWorkflow": { + "methods": [ + "create_migration_workflow" + ] + }, + "GetMigrationWorkflow": { + "methods": [ + "get_migration_workflow" + ] + }, + "ListMigrationWorkflows": { + "methods": [ + "list_migration_workflows" + ] + }, + "DeleteMigrationWorkflow": { + "methods": [ + "delete_migration_workflow" + ] + }, + "StartMigrationWorkflow": { + "methods": [ + "start_migration_workflow" + ] + }, + "GetMigrationSubtask": { + "methods": [ + "get_migration_subtask" + ] + }, + "ListMigrationSubtasks": { + "methods": [ + "list_migration_subtasks" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec new file mode 100644 index 000000000000..1050650c896d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/migration/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-migration-v2" + gem.version = Google::Cloud::Bigquery::Migration::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details." + gem.summary = "The migration service, exposing apis for migration jobs operations, and agent management." + 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.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb new file mode 100644 index 000000000000..c91652afe47e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.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/migration/v2" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb new file mode 100644 index 000000000000..a9ad338b1127 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.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! + +require "google/cloud/bigquery/migration/v2/migration_service" +require "google/cloud/bigquery/migration/v2/version" + +module Google + module Cloud + module Bigquery + module Migration + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/migration/v2" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/migration/v2" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module V2 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/bigquery/migration/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb new file mode 100644 index 000000000000..3cc37a0c122d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/assessment_task.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n8google/cloud/bigquery/migration/v2/assessment_task.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xf6\x01\n\x15\x41ssessmentTaskDetails\x12\x17\n\ninput_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0eoutput_dataset\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0equerylogs_path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x61ta_source\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12]\n\x0e\x66\x65\x61ture_handle\x18\x06 \x01(\x0b\x32;.google.cloud.bigquery.migration.v2.AssessmentFeatureHandleB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x11\n\x0f_feature_handle\"\\\n\x17\x41ssessmentFeatureHandle\x12\'\n\x15\x61\x64\x64_shareable_dataset\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x18\n\x16_add_shareable_datasetB\xcf\x01\n&com.google.cloud.bigquery.migration.v2B\x13\x41ssessmentTaskProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + AssessmentTaskDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AssessmentTaskDetails").msgclass + AssessmentFeatureHandle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AssessmentFeatureHandle").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb new file mode 100644 index 000000000000..64ad22c7c8c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/migration_entities.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/migration/v2/assessment_task_pb' +require 'google/cloud/bigquery/migration/v2/migration_error_details_pb' +require 'google/cloud/bigquery/migration/v2/migration_metrics_pb' +require 'google/cloud/bigquery/migration/v2/translation_config_pb' +require 'google/cloud/bigquery/migration/v2/translation_details_pb' +require 'google/cloud/bigquery/migration/v2/translation_usability_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/error_details_pb' + + +descriptor_data = "\n;google/cloud/bigquery/migration/v2/migration_entities.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/bigquery/migration/v2/assessment_task.proto\x1a@google/cloud/bigquery/migration/v2/migration_error_details.proto\x1a:google/cloud/bigquery/migration/v2/migration_metrics.proto\x1a;google/cloud/bigquery/migration/v2/translation_config.proto\x1agoogle/cloud/bigquery/migration/v2/translation_usability.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/rpc/error_details.proto\"\x80\x05\n\x11MigrationWorkflow\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12O\n\x05tasks\x18\x02 \x03(\x0b\x32@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\n\x05state\x18\x03 \x01(\x0e\x32;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a_\n\nTasksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.MigrationTask:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\r\n\tCOMPLETED\x10\x04:u\xea\x41r\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\n\x06points\x18\x04 \x03(\x0b\x32).google.cloud.bigquery.migration.v2.PointB\x03\xe0\x41\x02\"\x8a\x01\n\x05Point\x12\x42\n\x08interval\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.TimeInterval\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.migration.v2.TypedValue\"v\n\x0cTimeInterval\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xaa\x01\n\nTypedValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x36\n\x12\x64istribution_value\x18\x05 \x01(\x0b\x32\x18.google.api.DistributionH\x00\x42\x07\n\x05valueB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationMetricsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TimeSeries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeSeries").msgclass + Point = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Point").msgclass + TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeInterval").msgclass + TypedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TypedValue").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb new file mode 100644 index 000000000000..2d48893a2487 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb @@ -0,0 +1,57 @@ +# 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/migration/v2/version" + +require "google/cloud/bigquery/migration/v2/migration_service/credentials" +require "google/cloud/bigquery/migration/v2/migration_service/paths" +require "google/cloud/bigquery/migration/v2/migration_service/client" +require "google/cloud/bigquery/migration/v2/migration_service/rest" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + ## + # Service to handle EDW migrations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/migration/v2/migration_service" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/migration/v2/migration_service/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module MigrationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "migration_service", "helpers.rb" +require "google/cloud/bigquery/migration/v2/migration_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb new file mode 100644 index 000000000000..9996d48313f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb @@ -0,0 +1,1101 @@ +# 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/migration/v2/migration_service_pb" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + ## + # Client for the MigrationService service. + # + # Service to handle EDW migrations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :migration_service_stub + + ## + # Configure the MigrationService Client class. + # + # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MigrationService clients + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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", "Migration", "V2"] + 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_migration_workflow.timeout = 60.0 + + default_config.rpcs.get_migration_workflow.timeout = 60.0 + default_config.rpcs.get_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_migration_workflows.timeout = 60.0 + default_config.rpcs.list_migration_workflows.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_migration_workflow.timeout = 60.0 + + default_config.rpcs.start_migration_workflow.timeout = 60.0 + default_config.rpcs.start_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the MigrationService 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::Migration::V2::MigrationService::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 + @migration_service_stub.universe_domain + end + + ## + # Create a new MigrationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MigrationService 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/migration/v2/migration_service_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 + + @migration_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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 + ) + + @migration_service_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 + @migration_service_stub.logger + end + + # Service calls + + ## + # Creates a migration workflow. + # + # @overload create_migration_workflow(request, options = nil) + # Pass arguments to `create_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::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_migration_workflow(parent: nil, migration_workflow: nil) + # Pass arguments to `create_migration_workflow` 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 name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] + # Required. The migration workflow to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + # + # # Call the create_migration_workflow method. + # result = client.create_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def create_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest + + # 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_migration_workflow.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::Migration::V2::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_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :create_migration_workflow, 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 a previously created migration workflow. + # + # @overload get_migration_workflow(request, options = nil) + # Pass arguments to `get_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::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_migration_workflow(name: nil, read_mask: nil) + # Pass arguments to `get_migration_workflow` 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. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + # + # # Call the get_migration_workflow method. + # result = client.get_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def get_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest + + # 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_migration_workflow.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::Migration::V2::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_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :get_migration_workflow, 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 + + ## + # Lists previously created migration workflow. + # + # @overload list_migration_workflows(request, options = nil) + # Pass arguments to `list_migration_workflows` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::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 list_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_migration_workflows` 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 project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @param page_size [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @param page_token [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + # + # # Call the list_migration_workflows method. + # result = client.list_migration_workflows request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p item + # end + # + def list_migration_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest + + # 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.list_migration_workflows.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::Migration::V2::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.list_migration_workflows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_migration_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :list_migration_workflows, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a migration workflow by name. + # + # @overload delete_migration_workflow(request, options = nil) + # Pass arguments to `delete_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::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 delete_migration_workflow(name: nil) + # Pass arguments to `delete_migration_workflow` 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. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + # + # # Call the delete_migration_workflow method. + # result = client.delete_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest + + # 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.delete_migration_workflow.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::Migration::V2::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.delete_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :delete_migration_workflow, 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 + + ## + # Starts a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + # + # @overload start_migration_workflow(request, options = nil) + # Pass arguments to `start_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::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 start_migration_workflow(name: nil) + # Pass arguments to `start_migration_workflow` 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. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + # + # # Call the start_migration_workflow method. + # result = client.start_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def start_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest + + # 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.start_migration_workflow.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::Migration::V2::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.start_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :start_migration_workflow, 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 a previously created migration subtask. + # + # @overload get_migration_subtask(request, options = nil) + # Pass arguments to `get_migration_subtask` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::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_migration_subtask(name: nil, read_mask: nil) + # Pass arguments to `get_migration_subtask` 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. The unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + # + # # Call the get_migration_subtask method. + # result = client.get_migration_subtask request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p result + # + def get_migration_subtask request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest + + # 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_migration_subtask.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::Migration::V2::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_migration_subtask.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_migration_subtask.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :get_migration_subtask, 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 + + ## + # Lists previously created migration subtasks. + # + # @overload list_migration_subtasks(request, options = nil) + # Pass arguments to `list_migration_subtasks` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::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 list_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_migration_subtasks` 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 migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @param page_size [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @param page_token [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + # + # # Call the list_migration_subtasks method. + # result = client.list_migration_subtasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p item + # end + # + def list_migration_subtasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest + + # 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.list_migration_subtasks.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::Migration::V2::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.list_migration_subtasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_migration_subtasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :list_migration_subtasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MigrationService API. + # + # This class represents the configuration for MigrationService, + # 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::Migration::V2::MigrationService::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_migration_workflow to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.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::Migration::V2::MigrationService::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. + # * `: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 = "bigquerymigration.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 MigrationService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_migration_workflow + ## + # RPC-specific configuration for `get_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_workflow + ## + # RPC-specific configuration for `list_migration_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_workflows + ## + # RPC-specific configuration for `delete_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_migration_workflow + ## + # RPC-specific configuration for `start_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :start_migration_workflow + ## + # RPC-specific configuration for `get_migration_subtask` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_subtask + ## + # RPC-specific configuration for `list_migration_subtasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_subtasks + + # @private + def initialize parent_rpcs = nil + create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow + @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config + get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow + @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config + list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows + @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config + delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow + @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config + start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow + @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config + get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask + @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config + list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks + @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_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-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb new file mode 100644 index 000000000000..db5d89803933 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Migration + module V2 + module MigrationService + # Credentials for the MigrationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb new file mode 100644 index 000000000000..21bfeb2669a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb @@ -0,0 +1,92 @@ +# 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 Migration + module V2 + module MigrationService + # Path helper methods for the MigrationService API. + module Paths + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified MigrationSubtask resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # @param subtask [String] + # + # @return [::String] + def migration_subtask_path project:, location:, workflow:, subtask: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workflow cannot contain /" if workflow.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workflows/#{workflow}/subtasks/#{subtask}" + end + + ## + # Create a fully-qualified MigrationWorkflow resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # + # @return [::String] + def migration_workflow_path project:, location:, workflow: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workflows/#{workflow}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb new file mode 100644 index 000000000000..d298ae4f0452 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/migration/v2/version" + +require "google/cloud/bigquery/migration/v2/migration_service/credentials" +require "google/cloud/bigquery/migration/v2/migration_service/paths" +require "google/cloud/bigquery/migration/v2/migration_service/rest/client" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + ## + # Service to handle EDW migrations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/migration/v2/migration_service/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module MigrationService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/migration/v2/migration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb new file mode 100644 index 000000000000..c425938db5a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb @@ -0,0 +1,1009 @@ +# 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/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + module Rest + ## + # REST client for the MigrationService service. + # + # Service to handle EDW migrations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :migration_service_stub + + ## + # Configure the MigrationService Client class. + # + # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MigrationService clients + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::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", "Migration", "V2"] + 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_migration_workflow.timeout = 60.0 + + default_config.rpcs.get_migration_workflow.timeout = 60.0 + default_config.rpcs.get_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_migration_workflows.timeout = 60.0 + default_config.rpcs.list_migration_workflows.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_migration_workflow.timeout = 60.0 + + default_config.rpcs.start_migration_workflow.timeout = 60.0 + default_config.rpcs.start_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the MigrationService 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::Migration::V2::MigrationService::Rest::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 + @migration_service_stub.universe_domain + end + + ## + # Create a new MigrationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MigrationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # 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 + + @migration_service_stub = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @migration_service_stub.logger(stub: true)&.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 + @migration_service_stub.logger + end + + # Service calls + + ## + # Creates a migration workflow. + # + # @overload create_migration_workflow(request, options = nil) + # Pass arguments to `create_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::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_migration_workflow(parent: nil, migration_workflow: nil) + # Pass arguments to `create_migration_workflow` 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 name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] + # Required. The migration workflow to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + # + # # Call the create_migration_workflow method. + # result = client.create_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def create_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest + + # 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 + call_metadata = @config.rpcs.create_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.create_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a previously created migration workflow. + # + # @overload get_migration_workflow(request, options = nil) + # Pass arguments to `get_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::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_migration_workflow(name: nil, read_mask: nil) + # Pass arguments to `get_migration_workflow` 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. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + # + # # Call the get_migration_workflow method. + # result = client.get_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def get_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest + + # 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 + call_metadata = @config.rpcs.get_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.get_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration workflow. + # + # @overload list_migration_workflows(request, options = nil) + # Pass arguments to `list_migration_workflows` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::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 list_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_migration_workflows` 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 project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @param page_size [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @param page_token [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + # + # # Call the list_migration_workflows method. + # result = client.list_migration_workflows request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p item + # end + # + def list_migration_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest + + # 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 + call_metadata = @config.rpcs.list_migration_workflows.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_migration_workflows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_migration_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.list_migration_workflows request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, "migration_workflows", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a migration workflow by name. + # + # @overload delete_migration_workflow(request, options = nil) + # Pass arguments to `delete_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::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 delete_migration_workflow(name: nil) + # Pass arguments to `delete_migration_workflow` 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. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + # + # # Call the delete_migration_workflow method. + # result = client.delete_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest + + # 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 + call_metadata = @config.rpcs.delete_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.delete_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + # + # @overload start_migration_workflow(request, options = nil) + # Pass arguments to `start_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::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 start_migration_workflow(name: nil) + # Pass arguments to `start_migration_workflow` 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. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + # + # # Call the start_migration_workflow method. + # result = client.start_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def start_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest + + # 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 + call_metadata = @config.rpcs.start_migration_workflow.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.start_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.start_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a previously created migration subtask. + # + # @overload get_migration_subtask(request, options = nil) + # Pass arguments to `get_migration_subtask` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::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_migration_subtask(name: nil, read_mask: nil) + # Pass arguments to `get_migration_subtask` 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. The unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + # + # # Call the get_migration_subtask method. + # result = client.get_migration_subtask request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p result + # + def get_migration_subtask request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest + + # 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 + call_metadata = @config.rpcs.get_migration_subtask.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_migration_subtask.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_migration_subtask.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.get_migration_subtask request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration subtasks. + # + # @overload list_migration_subtasks(request, options = nil) + # Pass arguments to `list_migration_subtasks` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::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 list_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_migration_subtasks` 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 migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @param page_size [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @param page_token [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + # + # # Call the list_migration_subtasks method. + # result = client.list_migration_subtasks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p item + # end + # + def list_migration_subtasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest + + # 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 + call_metadata = @config.rpcs.list_migration_subtasks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_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::Migration::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_migration_subtasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_migration_subtasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.list_migration_subtasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, "migration_subtasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MigrationService REST API. + # + # This class represents the configuration for MigrationService REST, + # 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::Migration::V2::MigrationService::Rest::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_migration_workflow to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.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: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`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)) + # * (`nil`) indicating no credentials + # + # 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] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional 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. + # * `: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 = "bigquerymigration.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.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 :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 RPC class for the MigrationService 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 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_migration_workflow + ## + # RPC-specific configuration for `get_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_workflow + ## + # RPC-specific configuration for `list_migration_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_workflows + ## + # RPC-specific configuration for `delete_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_migration_workflow + ## + # RPC-specific configuration for `start_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :start_migration_workflow + ## + # RPC-specific configuration for `get_migration_subtask` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_subtask + ## + # RPC-specific configuration for `list_migration_subtasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_subtasks + + # @private + def initialize parent_rpcs = nil + create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow + @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config + get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow + @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config + list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows + @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config + delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow + @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config + start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow + @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config + get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask + @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config + list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks + @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb new file mode 100644 index 000000000000..21756920f3bf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb @@ -0,0 +1,512 @@ +# 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/migration/v2/migration_service_pb" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + module Rest + ## + # REST service stub for the MigrationService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: false, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # A result object deserialized from the server's reply + def create_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_migration_workflow_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # A result object deserialized from the server's reply + def get_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_workflow_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_migration_workflows REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] + # A result object deserialized from the server's reply + def list_migration_workflows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_workflows_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_migration_workflows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_migration_workflow_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the start_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def start_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_migration_workflow_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "start_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_migration_subtask REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # A result object deserialized from the server's reply + def get_migration_subtask request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_subtask_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_migration_subtask", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_migration_subtasks REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] + # A result object deserialized from the server's reply + def list_migration_subtasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_subtasks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_migration_subtasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/workflows", + body: "migration_workflow", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_migration_workflows REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_migration_workflows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/workflows", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_migration_subtask REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_migration_subtask_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/subtasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_migration_subtasks REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_migration_subtasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/subtasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb new file mode 100644 index 000000000000..22bab24f5771 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/migration_service.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/migration/v2/migration_entities_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n:google/cloud/bigquery/migration/v2/migration_service.proto\x12\"google.cloud.bigquery.migration.v2\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/migration/v2/migration_entities.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb3\x01\n\x1e\x43reateMigrationWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x12migration_workflow\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflowB\x03\xe0\x41\x02\"\x96\x01\n\x1bGetMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb0\x01\n\x1dListMigrationWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8d\x01\n\x1eListMigrationWorkflowsResponse\x12R\n\x13migration_workflows\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1e\x44\x65leteMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"i\n\x1dStartMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"\x99\x01\n\x1aGetMigrationSubtaskRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1bigquerymigration.googleapis.com/MigrationSubtask\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xe4\x01\n\x1cListMigrationSubtasksRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x1dListMigrationSubtasksResponse\x12P\n\x12migration_subtasks\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb\x0c\n\x10MigrationService\x12\xfb\x01\n\x17\x43reateMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"e\xda\x41\x19parent,migration_workflow\x82\xd3\xe4\x93\x02\x43\"-/v2/{parent=projects/*/locations/*}/workflows:\x12migration_workflow\x12\xcc\x01\n\x14GetMigrationWorkflow\x12?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/workflows/*}\x12\xdf\x01\n\x16ListMigrationWorkflows\x12\x41.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest\x1a\x42.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/workflows\x12\xb3\x01\n\x17\x44\x65leteMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/workflows/*}\x12\xba\x01\n\x16StartMigrationWorkflow\x12\x41.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/workflows/*}:start:\x01*\x12\xd4\x01\n\x13GetMigrationSubtask\x12>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest\x1a\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}\x12\xe7\x01\n\x15ListMigrationSubtasks\x12@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest\x1a\x41.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/locations/*/workflows/*}/subtasks\x1aT\xca\x41 bigquerymigration.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationServiceProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + CreateMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest").msgclass + GetMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest").msgclass + ListMigrationWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest").msgclass + ListMigrationWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse").msgclass + DeleteMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest").msgclass + StartMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest").msgclass + GetMigrationSubtaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest").msgclass + ListMigrationSubtasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest").msgclass + ListMigrationSubtasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb new file mode 100644 index 000000000000..8984838dfd6d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/migration/v2/migration_service.proto for package 'google.cloud.bigquery.migration.v2' +# 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/migration/v2/migration_service_pb' + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + # Service to handle EDW migrations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.migration.v2.MigrationService' + + # Creates a migration workflow. + rpc :CreateMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow + # Gets a previously created migration workflow. + rpc :GetMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow + # Lists previously created migration workflow. + rpc :ListMigrationWorkflows, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse + # Deletes a migration workflow by name. + rpc :DeleteMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Google::Protobuf::Empty + # Starts a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + rpc :StartMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Google::Protobuf::Empty + # Gets a previously created migration subtask. + rpc :GetMigrationSubtask, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask + # Lists previously created migration subtasks. + rpc :ListMigrationSubtasks, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb new file mode 100644 index 000000000000..76d58e045e9e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb @@ -0,0 +1,39 @@ +# 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/migration/v2/migration_service/rest" +require "google/cloud/bigquery/migration/v2/version" + +module Google + module Cloud + module Bigquery + module Migration + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/migration/v2/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module V2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb new file mode 100644 index 000000000000..26de688def6d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n;google/cloud/bigquery/migration/v2/translation_config.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe0\x03\n\x18TranslationConfigDetails\x12\x19\n\x0fgcs_source_path\x18\x01 \x01(\tH\x00\x12\x19\n\x0fgcs_target_path\x18\x02 \x01(\tH\x01\x12V\n\x11name_mapping_list\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.migration.v2.ObjectNameMappingListH\x02\x12\x43\n\x0esource_dialect\x18\x03 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x43\n\x0etarget_dialect\x18\x04 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x41\n\nsource_env\x18\x06 \x01(\x0b\x32-.google.cloud.bigquery.migration.v2.SourceEnv\x12\x16\n\x0erequest_source\x18\x08 \x01(\t\x12\x14\n\x0ctarget_types\x18\t \x03(\tB\x11\n\x0fsource_locationB\x11\n\x0ftarget_locationB\x15\n\x13output_name_mapping\"\xeb\n\n\x07\x44ialect\x12O\n\x10\x62igquery_dialect\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.BigQueryDialectH\x00\x12K\n\x0ehiveql_dialect\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.HiveQLDialectH\x00\x12O\n\x10redshift_dialect\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.RedshiftDialectH\x00\x12O\n\x10teradata_dialect\x18\x04 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.TeradataDialectH\x00\x12K\n\x0eoracle_dialect\x18\x05 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.OracleDialectH\x00\x12O\n\x10sparksql_dialect\x18\x06 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.SparkSQLDialectH\x00\x12Q\n\x11snowflake_dialect\x18\x07 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SnowflakeDialectH\x00\x12M\n\x0fnetezza_dialect\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NetezzaDialectH\x00\x12X\n\x15\x61zure_synapse_dialect\x18\t \x01(\x0b\x32\x37.google.cloud.bigquery.migration.v2.AzureSynapseDialectH\x00\x12M\n\x0fvertica_dialect\x18\n \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.VerticaDialectH\x00\x12R\n\x12sql_server_dialect\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SQLServerDialectH\x00\x12S\n\x12postgresql_dialect\x18\x0c \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.PostgresqlDialectH\x00\x12K\n\x0epresto_dialect\x18\r \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.PrestoDialectH\x00\x12I\n\rmysql_dialect\x18\x0e \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.MySQLDialectH\x00\x12\x45\n\x0b\x64\x62\x32_dialect\x18\x0f \x01(\x0b\x32..google.cloud.bigquery.migration.v2.DB2DialectH\x00\x12K\n\x0esqlite_dialect\x18\x10 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.SQLiteDialectH\x00\x12Q\n\x11greenplum_dialect\x18\x11 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.GreenplumDialectH\x00\x42\x0f\n\rdialect_value\"\x11\n\x0f\x42igQueryDialect\"\x0f\n\rHiveQLDialect\"\x11\n\x0fRedshiftDialect\"\x8a\x01\n\x0fTeradataDialect\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.bigquery.migration.v2.TeradataDialect.Mode\"/\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x07\n\x03SQL\x10\x01\x12\x08\n\x04\x42TEQ\x10\x02\"\x0f\n\rOracleDialect\"\x11\n\x0fSparkSQLDialect\"\x12\n\x10SnowflakeDialect\"\x10\n\x0eNetezzaDialect\"\x15\n\x13\x41zureSynapseDialect\"\x10\n\x0eVerticaDialect\"\x12\n\x10SQLServerDialect\"\x13\n\x11PostgresqlDialect\"\x0f\n\rPrestoDialect\"\x0e\n\x0cMySQLDialect\"\x0c\n\nDB2Dialect\"\x0f\n\rSQLiteDialect\"\x12\n\x10GreenplumDialect\"`\n\x15ObjectNameMappingList\x12G\n\x08name_map\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.ObjectNameMapping\"\x9d\x01\n\x11ObjectNameMapping\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NameMappingKey\x12\x44\n\x06target\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.NameMappingValue\"\xab\x02\n\x0eNameMappingKey\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.migration.v2.NameMappingKey.Type\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08relation\x18\x04 \x01(\t\x12\x11\n\tattribute\x18\x05 \x01(\t\"\x8a\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x0c\n\x08RELATION\x10\x03\x12\r\n\tATTRIBUTE\x10\x04\x12\x12\n\x0eRELATION_ALIAS\x10\x05\x12\x13\n\x0f\x41TTRIBUTE_ALIAS\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\"Y\n\x10NameMappingValue\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\"f\n\tSourceEnv\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd2\x01\n&com.google.cloud.bigquery.migration.v2B\x16TranslationConfigProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationConfigDetails").msgclass + Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Dialect").msgclass + BigQueryDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.BigQueryDialect").msgclass + HiveQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.HiveQLDialect").msgclass + RedshiftDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.RedshiftDialect").msgclass + TeradataDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect").msgclass + TeradataDialect::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect.Mode").enummodule + OracleDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.OracleDialect").msgclass + SparkSQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SparkSQLDialect").msgclass + SnowflakeDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SnowflakeDialect").msgclass + NetezzaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NetezzaDialect").msgclass + AzureSynapseDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AzureSynapseDialect").msgclass + VerticaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.VerticaDialect").msgclass + SQLServerDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLServerDialect").msgclass + PostgresqlDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PostgresqlDialect").msgclass + PrestoDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PrestoDialect").msgclass + MySQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.MySQLDialect").msgclass + DB2Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DB2Dialect").msgclass + SQLiteDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLiteDialect").msgclass + GreenplumDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GreenplumDialect").msgclass + ObjectNameMappingList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMappingList").msgclass + ObjectNameMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMapping").msgclass + NameMappingKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey").msgclass + NameMappingKey::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey.Type").enummodule + NameMappingValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingValue").msgclass + SourceEnv = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnv").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb new file mode 100644 index 000000000000..52eee84cfd27 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_details.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\n\x07literal\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x17\n\rgcs_file_path\x18\x04 \x01(\tH\x00\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06source\"#\n\nTargetSpec\x12\x15\n\rrelative_path\x18\x01 \x01(\t\"h\n\x07Literal\x12\x18\n\x0eliteral_string\x18\x02 \x01(\tH\x00\x12\x17\n\rliteral_bytes\x18\x03 \x01(\x0cH\x00\x12\x1a\n\rrelative_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0e\n\x0cliteral_data\"n\n\x11SourceEnvironment\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd3\x01\n&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationDetails").msgclass + SuggestionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionConfig").msgclass + SuggestionStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep").msgclass + SuggestionStep::SuggestionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType").enummodule + SuggestionStep::RewriteTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget").enummodule + SourceTargetMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceTargetMapping").msgclass + SourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceSpec").msgclass + TargetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TargetSpec").msgclass + Literal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Literal").msgclass + SourceEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnvironment").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb new file mode 100644 index 000000000000..b371a88bb83b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_suggestion.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/cloud/bigquery/migration/v2/translation_suggestion.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x88\x02\n\x17TranslationReportRecord\x12V\n\x08severity\x18\x01 \x01(\x0e\x32\x44.google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity\x12\x13\n\x0bscript_line\x18\x02 \x01(\x05\x12\x15\n\rscript_column\x18\x03 \x01(\x05\x12\x10\n\x08\x63\x61tegory\x18\x04 \x01(\t\x12\x0f\n\x07message\x18\x05 \x01(\t\"F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\xd6\x01\n&com.google.cloud.bigquery.migration.v2B\x1aTranslationSuggestionProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationReportRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord").msgclass + TranslationReportRecord::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb new file mode 100644 index 000000000000..840017a9f86a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_usability.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/cloud/bigquery/migration/v2/translation_usability.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf6\x01\n\x13GcsReportLogMessage\x12\x10\n\x08severity\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\x12\x11\n\tfile_path\x18\x03 \x01(\t\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x1a\n\x12source_script_line\x18\x05 \x01(\x05\x12\x1c\n\x14source_script_column\x18\x06 \x01(\x05\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x16\n\x0escript_context\x18\x08 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\t \x01(\t\x12\x0e\n\x06\x65\x66\x66\x65\x63t\x18\n \x01(\t\x12\x13\n\x0bobject_name\x18\x0b \x01(\tB\xd5\x01\n&com.google.cloud.bigquery.migration.v2B\x19TranslationUsabilityProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + GcsReportLogMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GcsReportLogMessage").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb new file mode 100644 index 000000000000..c33fa4b1c721 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/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 Migration + module V2 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md new file mode 100644 index 000000000000..6a3802be6255 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Migration V2 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-migration-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/api/distribution.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb new file mode 100644 index 000000000000..e4f870d5ad0d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb @@ -0,0 +1,233 @@ +# 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 + # `Distribution` contains summary statistics for a population of values. It + # optionally contains a histogram representing the distribution of those values + # across a set of buckets. + # + # The summary statistics are the count, mean, sum of the squared deviation from + # the mean, the minimum, and the maximum of the set of population of values. + # The histogram is based on a sequence of buckets and gives a count of values + # that fall into each bucket. The boundaries of the buckets are given either + # explicitly or by formulas for buckets of fixed or exponentially increasing + # widths. + # + # Although it is not forbidden, it is generally a bad idea to include + # non-finite values (infinities or NaNs) in the population of values, as this + # will render the `mean` and `sum_of_squared_deviation` fields meaningless. + # @!attribute [rw] count + # @return [::Integer] + # The number of values in the population. Must be non-negative. This value + # must equal the sum of the values in `bucket_counts` if a histogram is + # provided. + # @!attribute [rw] mean + # @return [::Float] + # The arithmetic mean of the values in the population. If `count` is zero + # then this field must be zero. + # @!attribute [rw] sum_of_squared_deviation + # @return [::Float] + # The sum of squared deviations from the mean of the values in the + # population. For values x_i this is: + # + # Sum[i=1..n]((x_i - mean)^2) + # + # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition + # describes Welford's method for accumulating this sum in one pass. + # + # If `count` is zero then this field must be zero. + # @!attribute [rw] range + # @return [::Google::Api::Distribution::Range] + # If specified, contains the range of the population values. The field + # must not be present if the `count` is zero. + # @!attribute [rw] bucket_options + # @return [::Google::Api::Distribution::BucketOptions] + # Defines the histogram bucket boundaries. If the distribution does not + # contain a histogram, then omit this field. + # @!attribute [rw] bucket_counts + # @return [::Array<::Integer>] + # The number of values in each bucket of the histogram, as described in + # `bucket_options`. If the distribution does not have a histogram, then omit + # this field. If there is a histogram, then the sum of the values in + # `bucket_counts` must equal the value in the `count` field of the + # distribution. + # + # If present, `bucket_counts` should contain N values, where N is the number + # of buckets specified in `bucket_options`. If you supply fewer than N + # values, the remaining values are assumed to be 0. + # + # The order of the values in `bucket_counts` follows the bucket numbering + # schemes described for the three bucket types. The first value must be the + # count for the underflow bucket (number 0). The next N-2 values are the + # counts for the finite buckets (number 1 through N-2). The N'th value in + # `bucket_counts` is the count for the overflow bucket (number N-1). + # @!attribute [rw] exemplars + # @return [::Array<::Google::Api::Distribution::Exemplar>] + # Must be in increasing order of `value` field. + class Distribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The range of the population values. + # @!attribute [rw] min + # @return [::Float] + # The minimum of the population values. + # @!attribute [rw] max + # @return [::Float] + # The maximum of the population values. + class Range + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BucketOptions` describes the bucket boundaries used to create a histogram + # for the distribution. The buckets can be in a linear sequence, an + # exponential sequence, or each bucket can be specified explicitly. + # `BucketOptions` does not include the number of values in each bucket. + # + # A bucket has an inclusive lower bound and exclusive upper bound for the + # values that are counted for that bucket. The upper bound of a bucket must + # be strictly greater than the lower bound. The sequence of N buckets for a + # distribution consists of an underflow bucket (number 0), zero or more + # finite buckets (number 1 through N - 2) and an overflow bucket (number N - + # 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the + # same as the upper bound of bucket i - 1. The buckets span the whole range + # of finite values: lower bound of the underflow bucket is -infinity and the + # upper bound of the overflow bucket is +infinity. The finite buckets are + # so-called because both bounds are finite. + # @!attribute [rw] linear_buckets + # @return [::Google::Api::Distribution::BucketOptions::Linear] + # The linear bucket. + # + # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exponential_buckets + # @return [::Google::Api::Distribution::BucketOptions::Exponential] + # The exponential buckets. + # + # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] explicit_buckets + # @return [::Google::Api::Distribution::BucketOptions::Explicit] + # The explicit buckets. + # + # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BucketOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies a linear sequence of buckets that all have the same width + # (except overflow and underflow). Each bucket represents a constant + # absolute uncertainty on the specific value in the bucket. + # + # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + # following boundaries: + # + # Upper bound (0 <= i < N-1): offset + (width * i). + # + # Lower bound (1 <= i < N): offset + (width * (i - 1)). + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # Must be greater than 0. + # @!attribute [rw] width + # @return [::Float] + # Must be greater than 0. + # @!attribute [rw] offset + # @return [::Float] + # Lower bound of the first bucket. + class Linear + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies an exponential sequence of buckets that have a width that is + # proportional to the value of the lower bound. Each bucket represents a + # constant relative uncertainty on a specific value in the bucket. + # + # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + # following boundaries: + # + # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). + # + # Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # Must be greater than 0. + # @!attribute [rw] growth_factor + # @return [::Float] + # Must be greater than 1. + # @!attribute [rw] scale + # @return [::Float] + # Must be greater than 0. + class Exponential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a set of buckets with arbitrary widths. + # + # There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following + # boundaries: + # + # Upper bound (0 <= i < N-1): bounds[i] + # Lower bound (1 <= i < N); bounds[i - 1] + # + # The `bounds` field must contain at least one element. If `bounds` has + # only one element, then there are no finite buckets, and that single + # element is the common boundary of the overflow and underflow buckets. + # @!attribute [rw] bounds + # @return [::Array<::Float>] + # The values must be monotonically increasing. + class Explicit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Exemplars are example points that may be used to annotate aggregated + # distribution values. They are metadata that gives information about a + # particular value added to a Distribution bucket, such as a trace ID that + # was active when a value was added. They may contain further information, + # such as a example values and timestamps, origin, etc. + # @!attribute [rw] value + # @return [::Float] + # Value of the exemplar point. This value determines to which bucket the + # exemplar belongs. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # The observation (sampling) time of the above value. + # @!attribute [rw] attachments + # @return [::Array<::Google::Protobuf::Any>] + # Contextual information about the example value. Examples are: + # + # Trace: type.googleapis.com/google.monitoring.v3.SpanContext + # + # Literal string: type.googleapis.com/google.protobuf.StringValue + # + # Labels dropped during aggregation: + # type.googleapis.com/google.monitoring.v3.DroppedLabels + # + # There may be only a single attachment of any given message type in a + # single exemplar, and this is enforced by the system. + class Exemplar + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb new file mode 100644 index 000000000000..02d2f8d451f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb @@ -0,0 +1,49 @@ +# 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 description of a label. + # @!attribute [rw] key + # @return [::String] + # The label key. + # @!attribute [rw] value_type + # @return [::Google::Api::LabelDescriptor::ValueType] + # The type of data that can be assigned to the label. + # @!attribute [rw] description + # @return [::String] + # A human-readable description for the label. + class LabelDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value types that can be used as label values. + module ValueType + # A variable-length string. This is the default. + STRING = 0 + + # Boolean; true or false. + BOOL = 1 + + # A 64-bit signed integer. + INT64 = 2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/api/metric.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb new file mode 100644 index 000000000000..56510feeee0f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb @@ -0,0 +1,299 @@ +# 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 + # Defines a metric type and its schema. Once a metric descriptor is created, + # deleting or altering it stops data collection and makes the metric type's + # existing data unusable. + # @!attribute [rw] name + # @return [::String] + # The resource name of the metric descriptor. + # @!attribute [rw] type + # @return [::String] + # The metric type, including its DNS name prefix. The type is not + # URL-encoded. All user-defined metric types have the DNS name + # `custom.googleapis.com` or `external.googleapis.com`. Metric types should + # use a natural hierarchical grouping. For example: + # + # "custom.googleapis.com/invoice/paid/amount" + # "external.googleapis.com/prometheus/up" + # "appengine.googleapis.com/http/server/response_latencies" + # @!attribute [rw] labels + # @return [::Array<::Google::Api::LabelDescriptor>] + # The set of labels that can be used to describe a specific + # instance of this metric type. For example, the + # `appengine.googleapis.com/http/server/response_latencies` metric + # type has a label for the HTTP response code, `response_code`, so + # you can look at latencies for successful responses or just + # for responses that failed. + # @!attribute [rw] metric_kind + # @return [::Google::Api::MetricDescriptor::MetricKind] + # Whether the metric records instantaneous values, changes to a value, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # @!attribute [rw] value_type + # @return [::Google::Api::MetricDescriptor::ValueType] + # Whether the measurement is an integer, a floating-point number, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # @!attribute [rw] unit + # @return [::String] + # The units in which the metric value is reported. It is only applicable + # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + # defines the representation of the stored metric values. + # + # Different systems might scale the values to be more easily displayed (so a + # value of `0.02kBy` _might_ be displayed as `20By`, and a value of + # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is + # `kBy`, then the value of the metric is always in thousands of bytes, no + # matter how it might be displayed. + # + # If you want a custom metric to record the exact number of CPU-seconds used + # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is + # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 + # CPU-seconds, then the value is written as `12005`. + # + # Alternatively, if you want a custom metric to record data in a more + # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is + # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), + # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). + # + # The supported units are a subset of [The Unified Code for Units of + # Measure](https://unitsofmeasure.org/ucum.html) standard: + # + # **Basic units (UNIT)** + # + # * `bit` bit + # * `By` byte + # * `s` second + # * `min` minute + # * `h` hour + # * `d` day + # * `1` dimensionless + # + # **Prefixes (PREFIX)** + # + # * `k` kilo (10^3) + # * `M` mega (10^6) + # * `G` giga (10^9) + # * `T` tera (10^12) + # * `P` peta (10^15) + # * `E` exa (10^18) + # * `Z` zetta (10^21) + # * `Y` yotta (10^24) + # + # * `m` milli (10^-3) + # * `u` micro (10^-6) + # * `n` nano (10^-9) + # * `p` pico (10^-12) + # * `f` femto (10^-15) + # * `a` atto (10^-18) + # * `z` zepto (10^-21) + # * `y` yocto (10^-24) + # + # * `Ki` kibi (2^10) + # * `Mi` mebi (2^20) + # * `Gi` gibi (2^30) + # * `Ti` tebi (2^40) + # * `Pi` pebi (2^50) + # + # **Grammar** + # + # The grammar also includes these connectors: + # + # * `/` division or ratio (as an infix operator). For examples, + # `kBy/{email}` or `MiBy/10ms` (although you should almost never + # have `/s` in a metric `unit`; rates should always be computed at + # query time from the underlying cumulative or delta value). + # * `.` multiplication or composition (as an infix operator). For + # examples, `GBy.d` or `k{watt}.h`. + # + # The grammar for a unit is as follows: + # + # Expression = Component { "." Component } { "/" Component } ; + # + # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] + # | Annotation + # | "1" + # ; + # + # Annotation = "{" NAME "}" ; + # + # Notes: + # + # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation + # is used alone, then the unit is equivalent to `1`. For examples, + # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. + # * `NAME` is a sequence of non-blank printable ASCII characters not + # containing `{` or `}`. + # * `1` represents a unitary [dimensionless + # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such + # as in `1/s`. It is typically used when none of the basic units are + # appropriate. For example, "new users per day" can be represented as + # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new + # users). Alternatively, "thousands of page views per day" would be + # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric + # value of `5.3` would mean "5300 page views per day"). + # * `%` represents dimensionless value of 1/100, and annotates values giving + # a percentage (so the metric values are typically in the range of 0..100, + # and a metric value `3` means "3 percent"). + # * `10^2.%` indicates a metric contains a ratio, typically in the range + # 0..1, that will be multiplied by 100 and displayed as a percentage + # (so a metric value `0.03` means "3 percent"). + # @!attribute [rw] description + # @return [::String] + # A detailed description of the metric, which can be used in documentation. + # @!attribute [rw] display_name + # @return [::String] + # A concise name for the metric, which can be displayed in user interfaces. + # Use sentence case without an ending period, for example "Request count". + # This field is optional but it is recommended to be set for any metrics + # associated with user-visible concepts, such as Quota. + # @!attribute [rw] metadata + # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata] + # Optional. Metadata which can be used to guide usage of the metric. + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Optional. The launch stage of the metric definition. + # @!attribute [rw] monitored_resource_types + # @return [::Array<::String>] + # Read-only. If present, then a [time + # series][google.monitoring.v3.TimeSeries], which is identified partially by + # a metric type and a + # [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that + # is associated with this metric type can only be associated with one of the + # monitored resource types listed here. + class MetricDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional annotations that can be used to guide the usage of a metric. + # @!attribute [rw] launch_stage + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Api::LaunchStage] + # Deprecated. Must use the + # {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} + # instead. + # @!attribute [rw] sample_period + # @return [::Google::Protobuf::Duration] + # The sampling period of metric data points. For metrics which are written + # periodically, consecutive data points are stored at this time interval, + # excluding data loss due to errors. Metrics with a higher granularity have + # a smaller sampling period. + # @!attribute [rw] ingest_delay + # @return [::Google::Protobuf::Duration] + # The delay of data points caused by ingestion. Data points older than this + # age are guaranteed to be ingested and available to be read, excluding + # data loss due to errors. + # @!attribute [rw] time_series_resource_hierarchy_level + # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>] + # The scope of the timeseries data of the metric. + class MetricDescriptorMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The resource hierarchy level of the timeseries data of a metric. + module TimeSeriesResourceHierarchyLevel + # Do not use this default value. + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0 + + # Scopes a metric to a project. + PROJECT = 1 + + # Scopes a metric to an organization. + ORGANIZATION = 2 + + # Scopes a metric to a folder. + FOLDER = 3 + end + end + + # The kind of measurement. It describes how the data is reported. + # For information on setting the start time and end time based on + # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. + module MetricKind + # Do not use this default value. + METRIC_KIND_UNSPECIFIED = 0 + + # An instantaneous measurement of a value. + GAUGE = 1 + + # The change in a value during a time interval. + DELTA = 2 + + # A value accumulated over a time interval. Cumulative + # measurements in a time series should have the same start time + # and increasing end times, until an event resets the cumulative + # value to zero and sets a new start time for the following + # points. + CUMULATIVE = 3 + end + + # The value type of a metric. + module ValueType + # Do not use this default value. + VALUE_TYPE_UNSPECIFIED = 0 + + # The value is a boolean. + # This value type can be used only if the metric kind is `GAUGE`. + BOOL = 1 + + # The value is a signed 64-bit integer. + INT64 = 2 + + # The value is a double precision floating point number. + DOUBLE = 3 + + # The value is a text string. + # This value type can be used only if the metric kind is `GAUGE`. + STRING = 4 + + # The value is a {::Google::Api::Distribution `Distribution`}. + DISTRIBUTION = 5 + + # The value is money. + MONEY = 6 + end + end + + # A specific metric, identified by specifying values for all of the + # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}. + # @!attribute [rw] type + # @return [::String] + # An existing metric type, see + # {::Google::Api::MetricDescriptor google.api.MetricDescriptor}. For example, + # `custom.googleapis.com/invoice/paid/amount`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The set of label values that uniquely identify this metric. All + # labels listed in the `MetricDescriptor` must be assigned values. + class Metric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb new file mode 100644 index 000000000000..51337845e2a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb @@ -0,0 +1,61 @@ +# 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 Migration + module V2 + # Assessment task config. + # @!attribute [rw] input_path + # @return [::String] + # Required. The Cloud Storage path for assessment input files. + # @!attribute [rw] output_dataset + # @return [::String] + # Required. The BigQuery dataset for output. + # @!attribute [rw] querylogs_path + # @return [::String] + # Optional. An optional Cloud Storage path to write the query logs (which is + # then used as an input path on the translation task) + # @!attribute [rw] data_source + # @return [::String] + # Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + # from which the input data is extracted. + # @!attribute [rw] feature_handle + # @return [::Google::Cloud::Bigquery::Migration::V2::AssessmentFeatureHandle] + # Optional. A collection of additional feature flags for this assessment. + class AssessmentTaskDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User-definable feature flags for assessment tasks. + # @!attribute [rw] add_shareable_dataset + # @return [::Boolean] + # Optional. Whether to create a dataset containing non-PII data in addition + # to the output dataset. + class AssessmentFeatureHandle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb new file mode 100644 index 000000000000..2e38004a68f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb @@ -0,0 +1,297 @@ +# 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 Migration + module V2 + # A migration workflow which specifies what needs to be done for an EDW + # migration. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. Identifier. The unique identifier for the migration + # workflow. The ID is server-generated. + # + # Example: `projects/123/locations/us/workflows/345` + # @!attribute [rw] display_name + # @return [::String] + # The display name of the workflow. This can be set to give a workflow + # a descriptive name. There is no guarantee or enforcement of uniqueness. + # @!attribute [rw] tasks + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Migration::V2::MigrationTask}] + # The tasks in a workflow in a named map. The name (i.e. key) has no + # meaning and is merely a convenient way to address a specific task + # in a workflow. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow::State] + # Output only. That status of the workflow. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the workflow was created. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the workflow was last updated. + class MigrationWorkflow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask] + class TasksEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible migration workflow states. + module State + # Workflow state is unspecified. + STATE_UNSPECIFIED = 0 + + # Workflow is in draft status, i.e. tasks are not yet eligible for + # execution. + DRAFT = 1 + + # Workflow is running (i.e. tasks are eligible for execution). + RUNNING = 2 + + # Workflow is paused. Tasks currently in progress may continue, but no + # further tasks will be scheduled. + PAUSED = 3 + + # Workflow is complete. There should not be any task in a non-terminal + # state, but if they are (e.g. forced termination), they will not be + # scheduled. + COMPLETED = 4 + end + end + + # A single task for a migration which has details about the configuration of + # the task. + # @!attribute [rw] assessment_task_details + # @return [::Google::Cloud::Bigquery::Migration::V2::AssessmentTaskDetails] + # Task configuration for Assessment. + # + # Note: The following fields are mutually exclusive: `assessment_task_details`, `translation_config_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_config_details + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationConfigDetails] + # Task configuration for CW Batch/Offline SQL Translation. + # + # Note: The following fields are mutually exclusive: `translation_config_details`, `assessment_task_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_details + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationDetails] + # Task details for unified SQL Translation. + # + # Note: The following fields are mutually exclusive: `translation_details`, `assessment_task_details`, `translation_config_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] id + # @return [::String] + # Output only. Immutable. The unique identifier for the migration task. The + # ID is server-generated. + # @!attribute [rw] type + # @return [::String] + # The type of the task. This must be one of the supported task types. + # + # Assessment: + # + # - `Assessment_Hive` - Assessment for Hive. + # - `Assessment_Redshift` - Assessment for Redshift. + # - `Assessment_Snowflake` - Assessment for Snowflake. + # - `Assessment_Teradata_v2` - Assessment for Teradata. + # - `Assessment_Oracle` - Assessment for Oracle. + # - `Assessment_Hadoop` - Assessment for Hadoop. + # - `Assessment_Informatica` - Assessment for Informatica. + # + # Translation: + # See [Supported Task + # Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + # for a list of supported task types. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask::State] + # Output only. The current state of the task. + # @!attribute [r] processing_error + # @return [::Google::Rpc::ErrorInfo] + # Output only. An explanation that may be populated when the task is in + # FAILED state. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the task was created. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the task was last updated. + # @!attribute [r] resource_error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] + # Output only. Provides details to errors and issues encountered while + # processing the task. Presence of error details does not mean that the task + # failed. + # @!attribute [r] resource_error_count + # @return [::Integer] + # Output only. The number or resources with errors. Note: This is not the + # total number of errors as each resource can have more than one error. This + # is used to indicate truncation by having a `resource_error_count` that is + # higher than the size of `resource_error_details`. + # @!attribute [r] metrics + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] + # Output only. The metrics for the task. + # @!attribute [r] task_result + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTaskResult] + # Output only. The result of the task. + # @!attribute [r] total_processing_error_count + # @return [::Integer] + # Output only. Count of all the processing errors in this task and its + # subtasks. + # @!attribute [r] total_resource_error_count + # @return [::Integer] + # Output only. Count of all the resource errors in this task and its + # subtasks. + class MigrationTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a migration task. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The task is waiting for orchestration. + PENDING = 1 + + # The task is assigned to an orchestrator. + ORCHESTRATING = 2 + + # The task is running, i.e. its subtasks are ready for execution. + RUNNING = 3 + + # The task is paused. Assigned subtasks can continue, but no new subtasks + # will be scheduled. + PAUSED = 4 + + # The task finished successfully. + SUCCEEDED = 5 + + # The task finished unsuccessfully. + FAILED = 6 + end + end + + # A subtask for a migration which carries details about the configuration of + # the subtask. The content of the details should not matter to the end user, + # but is a contract between the subtask creator and subtask worker. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. The resource name for the migration subtask. The ID + # is server-generated. + # + # Example: `projects/123/locations/us/workflows/345/subtasks/678` + # @!attribute [rw] task_id + # @return [::String] + # The unique ID of the task to which this subtask belongs. + # @!attribute [rw] type + # @return [::String] + # The type of the Subtask. The migration service does not check whether this + # is a known type. It is up to the task creator (i.e. orchestrator or worker) + # to ensure it only creates subtasks for which there are compatible workers + # polling for Subtasks. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask::State] + # Output only. The current state of the subtask. + # @!attribute [r] processing_error + # @return [::Google::Rpc::ErrorInfo] + # Output only. An explanation that may be populated when the task is in + # FAILED state. + # @!attribute [r] resource_error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] + # Output only. Provides details to errors and issues encountered while + # processing the subtask. Presence of error details does not mean that the + # subtask failed. + # @!attribute [r] resource_error_count + # @return [::Integer] + # Output only. The number or resources with errors. Note: This is not the + # total number of errors as each resource can have more than one error. This + # is used to indicate truncation by having a `resource_error_count` that is + # higher than the size of `resource_error_details`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the subtask was created. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the subtask was last updated. + # @!attribute [r] metrics + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] + # Output only. The metrics for the subtask. + class MigrationSubtask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a migration subtask. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The subtask is ready, i.e. it is ready for execution. + ACTIVE = 1 + + # The subtask is running, i.e. it is assigned to a worker for execution. + RUNNING = 2 + + # The subtask finished successfully. + SUCCEEDED = 3 + + # The subtask finished unsuccessfully. + FAILED = 4 + + # The subtask is paused, i.e., it will not be scheduled. If it was already + # assigned,it might still finish but no new lease renewals will be granted. + PAUSED = 5 + + # The subtask is pending a dependency. It will be scheduled once its + # dependencies are done. + PENDING_DEPENDENCY = 6 + end + end + + # The migration task result. + # @!attribute [rw] translation_task_result + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationTaskResult] + # Details specific to translation task types. + class MigrationTaskResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Translation specific result details from the migration task. + # @!attribute [rw] translated_literals + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Literal>] + # The list of the translated literals. + # @!attribute [rw] report_log_messages + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::GcsReportLogMessage>] + # The records from the aggregate CSV report for a migration workflow. + # @!attribute [rw] console_uri + # @return [::String] + # The Cloud Console URI for the migration workflow. + class TranslationTaskResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb new file mode 100644 index 000000000000..29dfe6d0ee40 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb @@ -0,0 +1,72 @@ +# 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 Migration + module V2 + # Provides details for errors and the corresponding resources. + # @!attribute [rw] resource_info + # @return [::Google::Rpc::ResourceInfo] + # Required. Information about the resource where the error is located. + # @!attribute [rw] error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ErrorDetail>] + # Required. The error details for the resource. + # @!attribute [rw] error_count + # @return [::Integer] + # Required. How many errors there are in total for the resource. Truncation + # can be indicated by having an `error_count` that is higher than the size of + # `error_details`. + class ResourceErrorDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides details for errors, e.g. issues that where encountered when + # processing a subtask. + # @!attribute [rw] location + # @return [::Google::Cloud::Bigquery::Migration::V2::ErrorLocation] + # Optional. The exact location within the resource (if applicable). + # @!attribute [rw] error_info + # @return [::Google::Rpc::ErrorInfo] + # Required. Describes the cause of the error with structured detail. + class ErrorDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds information about where the error is located. + # @!attribute [rw] line + # @return [::Integer] + # Optional. If applicable, denotes the line where the error occurred. A zero + # value means that there is no line information. + # @!attribute [rw] column + # @return [::Integer] + # Optional. If applicable, denotes the column where the error occurred. A + # zero value means that there is no columns information. + class ErrorLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb new file mode 100644 index 000000000000..41e34dd60654 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb @@ -0,0 +1,129 @@ +# 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 Migration + module V2 + # The metrics object for a SubTask. + # @!attribute [rw] metric + # @return [::String] + # Required. The name of the metric. + # + # If the metric is not known by the service yet, it will be auto-created. + # @!attribute [rw] value_type + # @return [::Google::Api::MetricDescriptor::ValueType] + # Required. The value type of the time series. + # @!attribute [rw] metric_kind + # @return [::Google::Api::MetricDescriptor::MetricKind] + # Optional. The metric kind of the time series. + # + # If present, it must be the same as the metric kind of the associated + # metric. If the associated metric's descriptor must be auto-created, then + # this field specifies the metric kind of the new descriptor and must be + # either `GAUGE` (the default) or `CUMULATIVE`. + # @!attribute [rw] points + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Point>] + # Required. The data points of this time series. When listing time series, + # points are returned in reverse time order. + # + # When creating a time series, this field must contain exactly one point and + # the point's type must be the same as the value type of the associated + # metric. If the associated metric's descriptor must be auto-created, then + # the value type of the descriptor is determined by the point's type, which + # must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + class TimeSeries + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single data point in a time series. + # @!attribute [rw] interval + # @return [::Google::Cloud::Bigquery::Migration::V2::TimeInterval] + # The time interval to which the data point applies. For `GAUGE` metrics, + # the start time does not need to be supplied, but if it is supplied, it must + # equal the end time. For `DELTA` metrics, the start and end time should + # specify a non-zero interval, with subsequent points specifying contiguous + # and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + # time should specify a non-zero interval, with subsequent points specifying + # the same start time and increasing end times, until an event resets the + # cumulative value to zero and sets a new start time for the following + # points. + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::Migration::V2::TypedValue] + # The value of the data point. + class Point + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A time interval extending just after a start time through an end time. + # If the start time is the same as the end time, then the interval + # represents a single point in time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The beginning of the time interval. The default value + # for the start time is the end time. The start time must not be + # later than the end time. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. The end of the time interval. + class TimeInterval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single strongly-typed value. + # @!attribute [rw] bool_value + # @return [::Boolean] + # A Boolean value: `true` or `false`. + # + # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int64_value + # @return [::Integer] + # A 64-bit integer. Its range is approximately `+/-9.2x10^18`. + # + # Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_value + # @return [::Float] + # A 64-bit double-precision floating-point number. Its magnitude + # is approximately `+/-10^(+/-300)` and it has 16 significant digits of + # precision. + # + # Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # A variable-length string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] distribution_value + # @return [::Google::Api::Distribution] + # A distribution value. + # + # Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TypedValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb new file mode 100644 index 000000000000..d833be3e5b1d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb @@ -0,0 +1,166 @@ +# 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 Migration + module V2 + # Request to create a migration workflow resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @!attribute [rw] migration_workflow + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # Required. The migration workflow to create. + class CreateMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be retrieved. + class GetMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list previously created migration workflows. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be retrieved. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + class ListMigrationWorkflowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for a `ListMigrationWorkflows` call. + # @!attribute [rw] migration_workflows + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # The migration workflows for the specified project / location. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMigrationWorkflowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + class DeleteMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to start a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + class StartMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a previously created migration subtasks. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be retrieved. + class GetMigrationSubtaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list previously created migration subtasks. + # @!attribute [rw] parent + # @return [::String] + # Required. The migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be retrieved. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + class ListMigrationSubtasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for a `ListMigrationSubtasks` call. + # @!attribute [rw] migration_subtasks + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # The migration subtasks for the specified task. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMigrationSubtasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb new file mode 100644 index 000000000000..d0c7dde5e35b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb @@ -0,0 +1,389 @@ +# 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 Migration + module V2 + # The translation config to capture necessary settings for a translation task + # and subtask. + # @!attribute [rw] gcs_source_path + # @return [::String] + # The Cloud Storage path for a directory of files to translate in a task. + # @!attribute [rw] gcs_target_path + # @return [::String] + # The Cloud Storage path to write back the corresponding input files to. + # @!attribute [rw] name_mapping_list + # @return [::Google::Cloud::Bigquery::Migration::V2::ObjectNameMappingList] + # The mapping of objects to their desired output names in list form. + # @!attribute [rw] source_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] + # The dialect of the input files. + # @!attribute [rw] target_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] + # The target dialect for the engine to translate the input to. + # @!attribute [rw] source_env + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnv] + # The default source environment values for the translation. + # @!attribute [rw] request_source + # @return [::String] + # The indicator to show translation request initiator. + # @!attribute [rw] target_types + # @return [::Array<::String>] + # The types of output to generate, e.g. sql, metadata etc. If not specified, + # a default set of targets will be generated. Some additional target types + # may be slower to generate. See the documentation for the set of available + # target types. + class TranslationConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible dialect options for translation. + # @!attribute [rw] bigquery_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::BigQueryDialect] + # The BigQuery dialect + # + # Note: The following fields are mutually exclusive: `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hiveql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::HiveQLDialect] + # The HiveQL dialect + # + # Note: The following fields are mutually exclusive: `hiveql_dialect`, `bigquery_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redshift_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::RedshiftDialect] + # The Redshift dialect + # + # Note: The following fields are mutually exclusive: `redshift_dialect`, `bigquery_dialect`, `hiveql_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] teradata_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect] + # The Teradata dialect + # + # Note: The following fields are mutually exclusive: `teradata_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oracle_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::OracleDialect] + # The Oracle dialect + # + # Note: The following fields are mutually exclusive: `oracle_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sparksql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SparkSQLDialect] + # The SparkSQL dialect + # + # Note: The following fields are mutually exclusive: `sparksql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] snowflake_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SnowflakeDialect] + # The Snowflake dialect + # + # Note: The following fields are mutually exclusive: `snowflake_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] netezza_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::NetezzaDialect] + # The Netezza dialect + # + # Note: The following fields are mutually exclusive: `netezza_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_synapse_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::AzureSynapseDialect] + # The Azure Synapse dialect + # + # Note: The following fields are mutually exclusive: `azure_synapse_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vertica_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::VerticaDialect] + # The Vertica dialect + # + # Note: The following fields are mutually exclusive: `vertica_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sql_server_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SQLServerDialect] + # The SQL Server dialect + # + # Note: The following fields are mutually exclusive: `sql_server_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] postgresql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::PostgresqlDialect] + # The Postgresql dialect + # + # Note: The following fields are mutually exclusive: `postgresql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] presto_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::PrestoDialect] + # The Presto dialect + # + # Note: The following fields are mutually exclusive: `presto_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mysql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::MySQLDialect] + # The MySQL dialect + # + # Note: The following fields are mutually exclusive: `mysql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] db2_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::DB2Dialect] + # DB2 dialect + # + # Note: The following fields are mutually exclusive: `db2_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sqlite_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SQLiteDialect] + # SQLite dialect + # + # Note: The following fields are mutually exclusive: `sqlite_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] greenplum_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::GreenplumDialect] + # Greenplum dialect + # + # Note: The following fields are mutually exclusive: `greenplum_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Dialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for BigQuery. + class BigQueryDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for HiveQL. + class HiveQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Redshift. + class RedshiftDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Teradata. + # @!attribute [rw] mode + # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect::Mode] + # Which Teradata sub-dialect mode the user specifies. + class TeradataDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The sub-dialect options for Teradata. + module Mode + # Unspecified mode. + MODE_UNSPECIFIED = 0 + + # Teradata SQL mode. + SQL = 1 + + # BTEQ mode (which includes SQL). + BTEQ = 2 + end + end + + # The dialect definition for Oracle. + class OracleDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SparkSQL. + class SparkSQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Snowflake. + class SnowflakeDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Netezza. + class NetezzaDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Azure Synapse. + class AzureSynapseDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Vertica. + class VerticaDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SQL Server. + class SQLServerDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Postgresql. + class PostgresqlDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Presto. + class PrestoDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for MySQL. + class MySQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for DB2. + class DB2Dialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SQLite. + class SQLiteDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Greenplum. + class GreenplumDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a map of name mappings using a list of key:value proto messages of + # existing name to desired output name. + # @!attribute [rw] name_map + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ObjectNameMapping>] + # The elements of the object name map. + class ObjectNameMappingList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a key-value pair of NameMappingKey to NameMappingValue to + # represent the mapping of SQL names from the input value to desired output. + # @!attribute [rw] source + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey] + # The name of the object in source that is being mapped. + # @!attribute [rw] target + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingValue] + # The desired target name of the object that is being mapped. + class ObjectNameMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The potential components of a full name mapping that will be mapped + # during translation in the source data warehouse. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey::Type] + # The type of object that is being mapped. + # @!attribute [rw] database + # @return [::String] + # The database name (BigQuery project ID equivalent in the source data + # warehouse). + # @!attribute [rw] schema + # @return [::String] + # The schema name (BigQuery dataset equivalent in the source data warehouse). + # @!attribute [rw] relation + # @return [::String] + # The relation name (BigQuery table or view equivalent in the source data + # warehouse). + # @!attribute [rw] attribute + # @return [::String] + # The attribute name (BigQuery column equivalent in the source data + # warehouse). + class NameMappingKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the object that is being mapped. + module Type + # Unspecified name mapping type. + TYPE_UNSPECIFIED = 0 + + # The object being mapped is a database. + DATABASE = 1 + + # The object being mapped is a schema. + SCHEMA = 2 + + # The object being mapped is a relation. + RELATION = 3 + + # The object being mapped is an attribute. + ATTRIBUTE = 4 + + # The object being mapped is a relation alias. + RELATION_ALIAS = 5 + + # The object being mapped is a an attribute alias. + ATTRIBUTE_ALIAS = 6 + + # The object being mapped is a function. + FUNCTION = 7 + end + end + + # The potential components of a full name mapping that will be mapped + # during translation in the target data warehouse. + # @!attribute [rw] database + # @return [::String] + # The database name (BigQuery project ID equivalent in the target data + # warehouse). + # @!attribute [rw] schema + # @return [::String] + # The schema name (BigQuery dataset equivalent in the target data warehouse). + # @!attribute [rw] relation + # @return [::String] + # The relation name (BigQuery table or view equivalent in the target data + # warehouse). + # @!attribute [rw] attribute + # @return [::String] + # The attribute name (BigQuery column equivalent in the target data + # warehouse). + class NameMappingValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the default source environment values for the translation. + # @!attribute [rw] default_database + # @return [::String] + # The default database name to fully qualify SQL objects when their database + # name is missing. + # @!attribute [rw] schema_search_path + # @return [::Array<::String>] + # The schema search path. When SQL objects are missing schema name, + # translation engine will search through this list to find the value. + # @!attribute [rw] metadata_store_dataset + # @return [::String] + # Optional. Expects a valid BigQuery dataset ID that exists, e.g., + # project-123.metadata_store_123. If specified, translation will search and + # read the required schema information from a metadata store in this dataset. + # If metadata store doesn't exist, translation will parse the metadata file + # and upload the schema info to a temp table in the dataset to speed up + # future translation jobs. + class SourceEnv + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb new file mode 100644 index 000000000000..43810632c46b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb @@ -0,0 +1,191 @@ +# 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 Migration + module V2 + # The translation details to capture the necessary settings for a translation + # job. + # @!attribute [rw] source_target_mapping + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SourceTargetMapping>] + # The mapping from source to target SQL. + # @!attribute [rw] target_base_uri + # @return [::String] + # The base URI for all writes to persistent storage. + # @!attribute [rw] source_environment + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnvironment] + # The default source environment values for the translation. + # @!attribute [rw] target_return_literals + # @return [::Array<::String>] + # The list of literal targets that will be directly returned to the response. + # Each entry consists of the constructed path, EXCLUDING the base path. Not + # providing a target_base_uri will prevent writing to persistent storage. + # @!attribute [rw] target_types + # @return [::Array<::String>] + # The types of output to generate, e.g. sql, metadata, + # lineage_from_sql_scripts, etc. If not specified, a default set of + # targets will be generated. Some additional target types may be slower to + # generate. See the documentation for the set of available target types. + # @!attribute [rw] suggestion_config + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionConfig] + # The configuration for the suggestion if requested as a target type. + class TranslationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration for the suggestion if requested as a target type. + # @!attribute [rw] skip_suggestion_steps + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SuggestionStep>] + # The list of suggestion steps to skip. + class SuggestionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Suggestion step to skip. + # @!attribute [rw] suggestion_type + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::SuggestionType] + # The type of suggestion. + # @!attribute [rw] rewrite_target + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::RewriteTarget] + # The rewrite target. + class SuggestionStep + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Suggestion type. + module SuggestionType + # Suggestion type unspecified. + SUGGESTION_TYPE_UNSPECIFIED = 0 + + # Query customization. + QUERY_CUSTOMIZATION = 1 + + # Translation explanation. + TRANSLATION_EXPLANATION = 2 + end + + # The target to apply the suggestion to. + module RewriteTarget + # Rewrite target unspecified. + REWRITE_TARGET_UNSPECIFIED = 0 + + # Source SQL. + SOURCE_SQL = 1 + + # Target SQL. + TARGET_SQL = 2 + end + end + + # Represents one mapping from a source SQL to a target SQL. + # @!attribute [rw] source_spec + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceSpec] + # The source SQL or the path to it. + # @!attribute [rw] target_spec + # @return [::Google::Cloud::Bigquery::Migration::V2::TargetSpec] + # The target SQL or the path for it. + class SourceTargetMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents one path to the location that holds source data. + # @!attribute [rw] base_uri + # @return [::String] + # The base URI for all files to be read in as sources for translation. + # + # Note: The following fields are mutually exclusive: `base_uri`, `literal`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] literal + # @return [::Google::Cloud::Bigquery::Migration::V2::Literal] + # Source literal. + # + # Note: The following fields are mutually exclusive: `literal`, `base_uri`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_file_path + # @return [::String] + # The path to a single source file in Cloud Storage. + # + # Note: The following fields are mutually exclusive: `gcs_file_path`, `base_uri`, `literal`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The optional field to specify the encoding of the sql bytes. + class SourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents one path to the location that holds target data. + # @!attribute [rw] relative_path + # @return [::String] + # The relative path for the target data. Given source file + # `base_uri/input/sql`, the output would be + # `target_base_uri/sql/relative_path/input.sql`. + class TargetSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Literal data. + # @!attribute [rw] literal_string + # @return [::String] + # Literal string data. + # + # Note: The following fields are mutually exclusive: `literal_string`, `literal_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] literal_bytes + # @return [::String] + # Literal byte data. + # + # Note: The following fields are mutually exclusive: `literal_bytes`, `literal_string`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] relative_path + # @return [::String] + # Required. The identifier of the literal entry. + class Literal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the default source environment values for the translation. + # @!attribute [rw] default_database + # @return [::String] + # The default database name to fully qualify SQL objects when their database + # name is missing. + # @!attribute [rw] schema_search_path + # @return [::Array<::String>] + # The schema search path. When SQL objects are missing schema name, + # translation engine will search through this list to find the value. + # @!attribute [rw] metadata_store_dataset + # @return [::String] + # Optional. Expects a validQ BigQuery dataset ID that exists, e.g., + # project-123.metadata_store_123. If specified, translation will search and + # read the required schema information from a metadata store in this dataset. + # If metadata store doesn't exist, translation will parse the metadata file + # and upload the schema info to a temp table in the dataset to speed up + # future translation jobs. + class SourceEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb new file mode 100644 index 000000000000..ba08b1dfb393 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.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! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # Details about a record. + # @!attribute [rw] severity + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationReportRecord::Severity] + # Severity of the translation record. + # @!attribute [rw] script_line + # @return [::Integer] + # Specifies the row from the source text where the error occurred (0 based). + # Example: 2 + # @!attribute [rw] script_column + # @return [::Integer] + # Specifies the column from the source texts where the error occurred. (0 + # based) example: 6 + # @!attribute [rw] category + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] message + # @return [::String] + # Detailed message of the record. + class TranslationReportRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity type of the record. + module Severity + # SeverityType not specified. + SEVERITY_UNSPECIFIED = 0 + + # INFO type. + INFO = 1 + + # WARNING type. The translated query may still provide useful information + # if all the report records are WARNING. + WARNING = 2 + + # ERROR type. Translation failed. + ERROR = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb new file mode 100644 index 000000000000..13d55b41ed54 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb @@ -0,0 +1,69 @@ +# 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 Migration + module V2 + # A record in the aggregate CSV report for a migration workflow + # @!attribute [rw] severity + # @return [::String] + # Severity of the translation record. + # @!attribute [rw] category + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] file_path + # @return [::String] + # The file path in which the error occurred + # @!attribute [rw] filename + # @return [::String] + # The file name in which the error occurred + # @!attribute [rw] source_script_line + # @return [::Integer] + # Specifies the row from the source text where the error occurred (0 based, + # -1 for messages without line location). Example: 2 + # @!attribute [rw] source_script_column + # @return [::Integer] + # Specifies the column from the source texts where the error occurred. (0 + # based, -1 for messages without column location) example: 6 + # @!attribute [rw] message + # @return [::String] + # Detailed message of the record. + # @!attribute [rw] script_context + # @return [::String] + # The script context (obfuscated) in which the error occurred + # @!attribute [rw] action + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] effect + # @return [::String] + # Effect of the error/warning. Example: COMPATIBILITY + # @!attribute [rw] object_name + # @return [::String] + # Name of the affected object in the log message. + class GcsReportLogMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# 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 generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# 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 + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# 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 from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb new file mode 100644 index 000000000000..507d2b54094a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb @@ -0,0 +1,420 @@ +# 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 + # Describes the cause of the error with structured details. + # + # Example of an error when contacting the "pubsub.googleapis.com" API when it + # is not enabled: + # + # { "reason": "API_DISABLED" + # "domain": "googleapis.com" + # "metadata": { + # "resource": "projects/123", + # "service": "pubsub.googleapis.com" + # } + # } + # + # This response indicates that the pubsub.googleapis.com API is not enabled. + # + # Example of an error that is returned when attempting to create a Spanner + # instance in a region that is out of stock: + # + # { "reason": "STOCKOUT" + # "domain": "spanner.googleapis.com", + # "metadata": { + # "availableRegions": "us-central1,us-east2" + # } + # } + # @!attribute [rw] reason + # @return [::String] + # The reason of the error. This is a constant value that identifies the + # proximate cause of the error. Error reasons are unique within a particular + # domain of errors. This should be at most 63 characters and match a + # regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents + # UPPER_SNAKE_CASE. + # @!attribute [rw] domain + # @return [::String] + # The logical grouping to which the "reason" belongs. The error domain + # is typically the registered service name of the tool or product that + # generates the error. Example: "pubsub.googleapis.com". If the error is + # generated by some common infrastructure, the error domain must be a + # globally unique value that identifies the infrastructure. For Google API + # infrastructure, the error domain is "googleapis.com". + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional structured details about this error. + # + # Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should + # ideally be lowerCamelCase. Also, they must be limited to 64 characters in + # length. When identifying the current value of an exceeded limit, the units + # should be contained in the key, not the value. For example, rather than + # `{"instanceLimit": "100/request"}`, should be returned as, + # `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of + # instances that can be created in a single (batch) request. + class ErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes when the clients can retry a failed request. Clients could ignore + # the recommendation here or retry when this information is missing from error + # responses. + # + # It's always recommended that clients should use exponential backoff when + # retrying. + # + # Clients should wait until `retry_delay` amount of time has passed since + # receiving the error response before retrying. If retrying requests also + # fail, clients should use an exponential backoff scheme to gradually increase + # the delay between retries based on `retry_delay`, until either a maximum + # number of retries have been reached or a maximum retry delay cap has been + # reached. + # @!attribute [rw] retry_delay + # @return [::Google::Protobuf::Duration] + # Clients should wait at least this long between retrying the same request. + class RetryInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes additional debugging info. + # @!attribute [rw] stack_entries + # @return [::Array<::String>] + # The stack trace entries indicating where the error occurred. + # @!attribute [rw] detail + # @return [::String] + # Additional debugging information provided by the server. + class DebugInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes how a quota check failed. + # + # For example if a daily limit was exceeded for the calling project, + # a service could respond with a QuotaFailure detail containing the project + # id and the description of the quota limit that was exceeded. If the + # calling project hasn't enabled the service in the developer console, then + # a service could respond with the project id and set `service_disabled` + # to true. + # + # Also see RetryInfo and Help types for other details about handling a + # quota failure. + # @!attribute [rw] violations + # @return [::Array<::Google::Rpc::QuotaFailure::Violation>] + # Describes all quota violations. + class QuotaFailure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single quota violation. For example, a + # daily quota or a custom quota that was exceeded. + # @!attribute [rw] subject + # @return [::String] + # The subject on which the quota check failed. + # For example, "clientip:" or "project:". + # @!attribute [rw] description + # @return [::String] + # A description of how the quota check failed. Clients can use this + # description to find more about the quota configuration in the service's + # public documentation, or find the relevant quota limit to adjust through + # developer console. + # + # For example: "Service disabled" or "Daily Limit for read operations + # exceeded". + # @!attribute [rw] api_service + # @return [::String] + # The API Service from which the `QuotaFailure.Violation` orginates. In + # some cases, Quota issues originate from an API Service other than the one + # that was called. In other words, a dependency of the called API Service + # could be the cause of the `QuotaFailure`, and this field would have the + # dependency API service name. + # + # For example, if the called API is Kubernetes Engine API + # (container.googleapis.com), and a quota violation occurs in the + # Kubernetes Engine API itself, this field would be + # "container.googleapis.com". On the other hand, if the quota violation + # occurs when the Kubernetes Engine API creates VMs in the Compute Engine + # API (compute.googleapis.com), this field would be + # "compute.googleapis.com". + # @!attribute [rw] quota_metric + # @return [::String] + # The metric of the violated quota. A quota metric is a named counter to + # measure usage, such as API requests or CPUs. When an activity occurs in a + # service, such as Virtual Machine allocation, one or more quota metrics + # may be affected. + # + # For example, "compute.googleapis.com/cpus_per_vm_family", + # "storage.googleapis.com/internet_egress_bandwidth". + # @!attribute [rw] quota_id + # @return [::String] + # The id of the violated quota. Also know as "limit name", this is the + # unique identifier of a quota in the context of an API service. + # + # For example, "CPUS-PER-VM-FAMILY-per-project-region". + # @!attribute [rw] quota_dimensions + # @return [::Google::Protobuf::Map{::String => ::String}] + # The dimensions of the violated quota. Every non-global quota is enforced + # on a set of dimensions. While quota metric defines what to count, the + # dimensions specify for what aspects the counter should be increased. + # + # For example, the quota "CPUs per region per VM family" enforces a limit + # on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions + # "region" and "vm_family". And if the violation occurred in region + # "us-central1" and for VM family "n1", the quota_dimensions would be, + # + # { + # "region": "us-central1", + # "vm_family": "n1", + # } + # + # When a quota is enforced globally, the quota_dimensions would always be + # empty. + # @!attribute [rw] quota_value + # @return [::Integer] + # The enforced quota value at the time of the `QuotaFailure`. + # + # For example, if the enforced quota value at the time of the + # `QuotaFailure` on the number of CPUs is "10", then the value of this + # field would reflect this quantity. + # @!attribute [rw] future_quota_value + # @return [::Integer] + # The new quota value being rolled out at the time of the violation. At the + # completion of the rollout, this value will be enforced in place of + # quota_value. If no rollout is in progress at the time of the violation, + # this field is not set. + # + # For example, if at the time of the violation a rollout is in progress + # changing the number of CPUs quota from 10 to 20, 20 would be the value of + # this field. + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class QuotaDimensionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Describes what preconditions have failed. + # + # For example, if an RPC failed because it required the Terms of Service to be + # acknowledged, it could list the terms of service violation in the + # PreconditionFailure message. + # @!attribute [rw] violations + # @return [::Array<::Google::Rpc::PreconditionFailure::Violation>] + # Describes all precondition violations. + class PreconditionFailure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single precondition failure. + # @!attribute [rw] type + # @return [::String] + # The type of PreconditionFailure. We recommend using a service-specific + # enum type to define the supported precondition violation subjects. For + # example, "TOS" for "Terms of Service violation". + # @!attribute [rw] subject + # @return [::String] + # The subject, relative to the type, that failed. + # For example, "google.com/cloud" relative to the "TOS" type would indicate + # which terms of service is being referenced. + # @!attribute [rw] description + # @return [::String] + # A description of how the precondition failed. Developers can use this + # description to understand how to fix the failure. + # + # For example: "Terms of service not accepted". + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes violations in a client request. This error type focuses on the + # syntactic aspects of the request. + # @!attribute [rw] field_violations + # @return [::Array<::Google::Rpc::BadRequest::FieldViolation>] + # Describes all violations in a client request. + class BadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single bad request field. + # @!attribute [rw] field + # @return [::String] + # A path that leads to a field in the request body. The value will be a + # sequence of dot-separated identifiers that identify a protocol buffer + # field. + # + # Consider the following: + # + # message CreateContactRequest { + # message EmailAddress { + # enum Type { + # TYPE_UNSPECIFIED = 0; + # HOME = 1; + # WORK = 2; + # } + # + # optional string email = 1; + # repeated EmailType type = 2; + # } + # + # string full_name = 1; + # repeated EmailAddress email_addresses = 2; + # } + # + # In this example, in proto `field` could take one of the following values: + # + # * `full_name` for a violation in the `full_name` value + # * `email_addresses[0].email` for a violation in the `email` field of the + # first `email_addresses` message + # * `email_addresses[2].type[1]` for a violation in the second `type` + # value in the third `email_addresses` message. + # + # In JSON, the same values are represented as: + # + # * `fullName` for a violation in the `fullName` value + # * `emailAddresses[0].email` for a violation in the `email` field of the + # first `emailAddresses` message + # * `emailAddresses[2].type[1]` for a violation in the second `type` + # value in the third `emailAddresses` message. + # @!attribute [rw] description + # @return [::String] + # A description of why the request element is bad. + # @!attribute [rw] reason + # @return [::String] + # The reason of the field-level error. This is a constant value that + # identifies the proximate cause of the field-level error. It should + # uniquely identify the type of the FieldViolation within the scope of the + # google.rpc.ErrorInfo.domain. This should be at most 63 + # characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, + # which represents UPPER_SNAKE_CASE. + # @!attribute [rw] localized_message + # @return [::Google::Rpc::LocalizedMessage] + # Provides a localized error message for field-level errors that is safe to + # return to the API consumer. + class FieldViolation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains metadata about the request that clients can attach when filing a bug + # or providing other forms of feedback. + # @!attribute [rw] request_id + # @return [::String] + # An opaque string that should only be interpreted by the service generating + # it. For example, it can be used to identify requests in the service's logs. + # @!attribute [rw] serving_data + # @return [::String] + # Any data that was used to serve this request. For example, an encrypted + # stack trace that can be sent back to the service provider for debugging. + class RequestInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the resource that is being accessed. + # @!attribute [rw] resource_type + # @return [::String] + # A name for the type of resource being accessed, e.g. "sql table", + # "cloud storage bucket", "file", "Google calendar"; or the type URL + # of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". + # @!attribute [rw] resource_name + # @return [::String] + # The name of the resource being accessed. For example, a shared calendar + # name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current + # error is + # [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + # @!attribute [rw] owner + # @return [::String] + # The owner of the resource (optional). + # For example, "user:" or "project:". + # @!attribute [rw] description + # @return [::String] + # Describes what error is encountered when accessing this resource. + # For example, updating a cloud project may require the `writer` permission + # on the developer console project. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides links to documentation or for performing an out of band action. + # + # For example, if a quota check failed with an error indicating the calling + # project hasn't enabled the accessed service, this can contain a URL pointing + # directly to the right place in the developer console to flip the bit. + # @!attribute [rw] links + # @return [::Array<::Google::Rpc::Help::Link>] + # URL(s) pointing to additional information on handling the current error. + class Help + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a URL link. + # @!attribute [rw] description + # @return [::String] + # Describes what the link offers. + # @!attribute [rw] url + # @return [::String] + # The URL of the link. + class Link + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Provides a localized error message that is safe to return to the user + # which can be attached to an RPC error. + # @!attribute [rw] locale + # @return [::String] + # The locale used following the specification defined at + # https://www.rfc-editor.org/rfc/bcp/bcp47.txt. + # Examples are: "en-US", "fr-CH", "es-MX" + # @!attribute [rw] message + # @return [::String] + # The localized error message in the above locale. + class LocalizedMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile new file mode 100644 index 000000000000..4d1b3eac9aa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2", path: "../" +else + gem "google-cloud-bigquery-migration-v2" +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-migration-v2/snippets/migration_service/create_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb new file mode 100644 index 000000000000..eb3b21d627fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the create_migration_workflow call in the MigrationService 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::Migration::V2::MigrationService::Client#create_migration_workflow. +# +def create_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + + # Call the create_migration_workflow method. + result = client.create_migration_workflow request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb new file mode 100644 index 000000000000..add86a0f96f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the delete_migration_workflow call in the MigrationService 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::Migration::V2::MigrationService::Client#delete_migration_workflow. +# +def delete_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + + # Call the delete_migration_workflow method. + result = client.delete_migration_workflow request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb new file mode 100644 index 000000000000..1e668aecb17b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.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 bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the get_migration_subtask call in the MigrationService 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::Migration::V2::MigrationService::Client#get_migration_subtask. +# +def get_migration_subtask + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + + # Call the get_migration_subtask method. + result = client.get_migration_subtask request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb new file mode 100644 index 000000000000..835a5af7a227 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the get_migration_workflow call in the MigrationService 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::Migration::V2::MigrationService::Client#get_migration_workflow. +# +def get_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + + # Call the get_migration_workflow method. + result = client.get_migration_workflow request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb new file mode 100644 index 000000000000..b526522af82b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb @@ -0,0 +1,51 @@ +# 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 bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the list_migration_subtasks call in the MigrationService 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::Migration::V2::MigrationService::Client#list_migration_subtasks. +# +def list_migration_subtasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + + # Call the list_migration_subtasks method. + result = client.list_migration_subtasks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + p item + end +end +# [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb new file mode 100644 index 000000000000..acc8872c9867 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb @@ -0,0 +1,51 @@ +# 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 bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the list_migration_workflows call in the MigrationService 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::Migration::V2::MigrationService::Client#list_migration_workflows. +# +def list_migration_workflows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + + # Call the list_migration_workflows method. + result = client.list_migration_workflows request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + p item + end +end +# [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb new file mode 100644 index 000000000000..db1b4071ef4d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the start_migration_workflow call in the MigrationService 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::Migration::V2::MigrationService::Client#start_migration_workflow. +# +def start_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + + # Call the start_migration_workflow method. + result = client.start_migration_workflow request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json new file mode 100644 index 000000000000..a72510c3fe90 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-migration-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.migration.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync", + "title": "Snippet for the create_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow.", + "file": "migration_service/create_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "CreateMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync", + "title": "Snippet for the get_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow.", + "file": "migration_service/get_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "GetMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync", + "title": "Snippet for the list_migration_workflows call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows.", + "file": "migration_service/list_migration_workflows.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_migration_workflows", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "ListMigrationWorkflows", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync", + "title": "Snippet for the delete_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow.", + "file": "migration_service/delete_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "DeleteMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync", + "title": "Snippet for the start_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow.", + "file": "migration_service/start_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "StartMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync", + "title": "Snippet for the get_migration_subtask call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask.", + "file": "migration_service/get_migration_subtask.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_migration_subtask", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "GetMigrationSubtask", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync", + "title": "Snippet for the list_migration_subtasks call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks.", + "file": "migration_service/list_migration_subtasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_migration_subtasks", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "ListMigrationSubtasks", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb new file mode 100644 index 000000000000..930bdb76bea3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb @@ -0,0 +1,79 @@ +# 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/migration/v2/migration_service" + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_location_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::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_migration_subtask_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::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.migration_subtask_path project: "value0", location: "value1", workflow: "value2", subtask: "value3" + assert_equal "projects/value0/locations/value1/workflows/value2/subtasks/value3", path + end + end + + def test_migration_workflow_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::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.migration_workflow_path project: "value0", location: "value1", workflow: "value2" + assert_equal "projects/value0/locations/value1/workflows/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb new file mode 100644 index 000000000000..80f02da8615f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb @@ -0,0 +1,487 @@ +# 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/rest" +require "google/cloud/bigquery/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service/rest" + + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + 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_migration_workflow + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + migration_workflow = {} + + create_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_create_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_migration_workflow_client_stub.call_count + end + end + end + + def test_get_migration_workflow + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_migration_workflow({ name: name, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_migration_workflow name: name, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_migration_workflow({ name: name, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_migration_workflow_client_stub.call_count + end + end + end + + def test_list_migration_workflows + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_mask = {} + page_size = 42 + page_token = "hello world" + + list_migration_workflows_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_workflows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_migration_workflows_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_migration_workflows_client_stub.call_count + end + end + end + + def test_delete_migration_workflow + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_delete_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_migration_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_migration_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_migration_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_migration_workflow_client_stub.call_count + end + end + end + + def test_start_migration_workflow + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_start_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_migration_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_migration_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_migration_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_migration_workflow_client_stub.call_count + end + end + end + + def test_get_migration_subtask + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_migration_subtask_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_subtask_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_migration_subtask_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_migration_subtask({ name: name, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_migration_subtask name: name, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_migration_subtask({ name: name, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_migration_subtask_client_stub.call_count + end + end + end + + def test_list_migration_subtasks + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_mask = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_migration_subtasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_subtasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_migration_subtasks_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_migration_subtasks parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_migration_subtasks_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb new file mode 100644 index 000000000000..6e5729ddc0c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb @@ -0,0 +1,540 @@ +# 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/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service" + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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" + migration_workflow = {} + + create_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow), request["migration_workflow"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_migration_workflow_client_stub.call_rpc_count + end + end + + def test_get_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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" + read_mask = {} + + get_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_migration_workflow({ name: name, read_mask: read_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_migration_workflow name: name, read_mask: read_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_migration_workflow({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_migration_workflow_client_stub.call_rpc_count + end + end + + def test_list_migration_workflows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.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_mask = {} + page_size = 42 + page_token = "hello world" + + list_migration_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_migration_workflows, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_migration_workflows_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_migration_workflows_client_stub.call_rpc_count + end + end + + def test_delete_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.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" + + delete_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_migration_workflow({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_migration_workflow name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_migration_workflow({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.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, delete_migration_workflow_client_stub.call_rpc_count + end + end + + def test_start_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.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" + + start_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_migration_workflow({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_migration_workflow name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_migration_workflow({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.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, start_migration_workflow_client_stub.call_rpc_count + end + end + + def test_get_migration_subtask + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.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" + read_mask = {} + + get_migration_subtask_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_migration_subtask, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_migration_subtask_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_migration_subtask({ name: name, read_mask: read_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_migration_subtask name: name, read_mask: read_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_migration_subtask({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_migration_subtask_client_stub.call_rpc_count + end + end + + def test_list_migration_subtasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.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_mask = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_migration_subtasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_migration_subtasks, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_migration_subtasks_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_migration_subtasks parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_migration_subtasks_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::Migration::V2::MigrationService::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::Migration::V2::MigrationService::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::Migration::V2::MigrationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb @@ -0,0 +1,26 @@ +# 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 "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From e45c85b9db14e3ca0c1d9cf24a6f220fb64b74aa Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 20 May 2026 20:08:44 +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 --- .../.owlbot-manifest.json | 2 + .../migration/v2/assessment_task_pb.rb | 0 .../migration/v2/migration_entities_pb.rb | 3 +- .../migration/v2/translation_details_pb.rb | 6 +- .../proto_docs/google/api/client.rb | 4 + .../bigquery/migration/v2/assessment_task.rb | 0 .../migration/v2/migration_entities.rb | 99 +- .../migration/v2/translation_details.rb | 57 +- .../proto_docs/google/rpc/error_details.rb | 8 +- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 --- .../README.md | 154 --- .../Rakefile | 169 --- .../gapic_metadata.json | 53 - ...google-cloud-bigquery-migration-v2.gemspec | 28 - .../lib/google-cloud-bigquery-migration-v2.rb | 21 - .../lib/google/cloud/bigquery/migration/v2.rb | 47 - .../migration/v2/migration_entities_pb.rb | 41 - .../v2/migration_error_details_pb.rb | 28 - .../migration/v2/migration_metrics_pb.rb | 31 - .../migration/v2/migration_service.rb | 57 - .../migration/v2/migration_service/client.rb | 1101 ----------------- .../v2/migration_service/credentials.rb | 49 - .../migration/v2/migration_service/paths.rb | 92 -- .../migration/v2/migration_service/rest.rb | 54 - .../v2/migration_service/rest/client.rb | 1009 --------------- .../v2/migration_service/rest/service_stub.rb | 512 -------- .../migration/v2/migration_service_pb.rb | 39 - .../v2/migration_service_services_pb.rb | 62 - .../cloud/bigquery/migration/v2/rest.rb | 39 - .../migration/v2/translation_config_pb.rb | 50 - .../migration/v2/translation_details_pb.rb | 34 - .../migration/v2/translation_suggestion_pb.rb | 27 - .../migration/v2/translation_usability_pb.rb | 26 - .../cloud/bigquery/migration/v2/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --------- .../proto_docs/google/api/distribution.rb | 233 ---- .../proto_docs/google/api/field_behavior.rb | 85 -- .../proto_docs/google/api/label.rb | 49 - .../proto_docs/google/api/launch_stage.rb | 71 -- .../proto_docs/google/api/metric.rb | 299 ----- .../proto_docs/google/api/resource.rb | 227 ---- .../migration/v2/migration_entities.rb | 297 ----- .../migration/v2/migration_error_details.rb | 72 -- .../migration/v2/migration_metrics.rb | 129 -- .../migration/v2/migration_service.rb | 166 --- .../migration/v2/translation_config.rb | 389 ------ .../migration/v2/translation_details.rb | 191 --- .../migration/v2/translation_suggestion.rb | 67 - .../migration/v2/translation_usability.rb | 69 -- .../proto_docs/google/protobuf/any.rb | 145 --- .../proto_docs/google/protobuf/duration.rb | 98 -- .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 ---- .../proto_docs/google/protobuf/timestamp.rb | 127 -- .../proto_docs/google/rpc/error_details.rb | 420 ------- .../snippets/Gemfile | 32 - .../create_migration_workflow.rb | 47 - .../delete_migration_workflow.rb | 47 - .../get_migration_subtask.rb | 47 - .../get_migration_workflow.rb | 47 - .../list_migration_subtasks.rb | 51 - .../list_migration_workflows.rb | 51 - .../start_migration_workflow.rb | 47 - ...ta_google.cloud.bigquery.migration.v2.json | 295 ----- .../v2/migration_service_paths_test.rb | 79 -- .../v2/migration_service_rest_test.rb | 487 -------- .../migration/v2/migration_service_test.rb | 540 -------- .../test/helper.rb | 26 - 77 files changed, 131 insertions(+), 10042 deletions(-) rename {owl-bot-staging/google-cloud-bigquery-migration-v2 => google-cloud-bigquery-migration-v2}/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb (100%) rename {owl-bot-staging/google-cloud-bigquery-migration-v2 => google-cloud-bigquery-migration-v2}/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_error_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_metrics_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb diff --git a/google-cloud-bigquery-migration-v2/.owlbot-manifest.json b/google-cloud-bigquery-migration-v2/.owlbot-manifest.json index c3e49cc211aa..eafbfacbb54f 100644 --- a/google-cloud-bigquery-migration-v2/.owlbot-manifest.json +++ b/google-cloud-bigquery-migration-v2/.owlbot-manifest.json @@ -15,6 +15,7 @@ "google-cloud-bigquery-migration-v2.gemspec", "lib/google-cloud-bigquery-migration-v2.rb", "lib/google/cloud/bigquery/migration/v2.rb", + "lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb", "lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb", "lib/google/cloud/bigquery/migration/v2/migration_error_details_pb.rb", "lib/google/cloud/bigquery/migration/v2/migration_metrics_pb.rb", @@ -41,6 +42,7 @@ "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/metric.rb", "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb", "proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb", "proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb", "proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb", diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb rename to google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/assessment_task_pb.rb diff --git a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb index 3b3b88bfbf9f..64ad22c7c8c2 100644 --- a/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb +++ b/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb @@ -6,6 +6,7 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/cloud/bigquery/migration/v2/assessment_task_pb' require 'google/cloud/bigquery/migration/v2/migration_error_details_pb' require 'google/cloud/bigquery/migration/v2/migration_metrics_pb' require 'google/cloud/bigquery/migration/v2/translation_config_pb' @@ -15,7 +16,7 @@ require 'google/rpc/error_details_pb' -descriptor_data = "\n;google/cloud/bigquery/migration/v2/migration_entities.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a@google/cloud/bigquery/migration/v2/migration_error_details.proto\x1a:google/cloud/bigquery/migration/v2/migration_metrics.proto\x1a;google/cloud/bigquery/migration/v2/translation_config.proto\x1agoogle/cloud/bigquery/migration/v2/translation_usability.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/rpc/error_details.proto\"\xf6\x04\n\x11MigrationWorkflow\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12O\n\x05tasks\x18\x02 \x03(\x0b\x32@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\n\x05state\x18\x03 \x01(\x0e\x32;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xe0\x41\x03\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a_\n\nTasksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.MigrationTask:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\r\n\tCOMPLETED\x10\x04:u\xea\x41r\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12google/cloud/bigquery/migration/v2/translation_usability.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/rpc/error_details.proto\"\x80\x05\n\x11MigrationWorkflow\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12O\n\x05tasks\x18\x02 \x03(\x0b\x32@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\n\x05state\x18\x03 \x01(\x0e\x32;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a_\n\nTasksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.MigrationTask:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\r\n\tCOMPLETED\x10\x04:u\xea\x41r\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\n\x07literal\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06source\"#\n\nTargetSpec\x12\x15\n\rrelative_path\x18\x01 \x01(\t\"h\n\x07Literal\x12\x18\n\x0eliteral_string\x18\x02 \x01(\tH\x00\x12\x17\n\rliteral_bytes\x18\x03 \x01(\x0cH\x00\x12\x1a\n\rrelative_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0e\n\x0cliteral_data\"n\n\x11SourceEnvironment\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd3\x01\n&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" +descriptor_data = "\n\n\x07literal\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x17\n\rgcs_file_path\x18\x04 \x01(\tH\x00\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06source\"#\n\nTargetSpec\x12\x15\n\rrelative_path\x18\x01 \x01(\t\"h\n\x07Literal\x12\x18\n\x0eliteral_string\x18\x02 \x01(\tH\x00\x12\x17\n\rliteral_bytes\x18\x03 \x01(\x0cH\x00\x12\x1a\n\rrelative_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0e\n\x0cliteral_data\"n\n\x11SourceEnvironment\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd3\x01\n&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -18,6 +18,10 @@ module Bigquery module Migration module V2 TranslationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationDetails").msgclass + SuggestionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionConfig").msgclass + SuggestionStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep").msgclass + SuggestionStep::SuggestionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType").enummodule + SuggestionStep::RewriteTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget").enummodule SourceTargetMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceTargetMapping").msgclass SourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceSpec").msgclass TargetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TargetSpec").msgclass diff --git a/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb index 7796382e3a21..e62ceba4577a 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!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 @@ -441,6 +443,8 @@ class LongRunning # 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 diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb similarity index 100% rename from owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb rename to google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/assessment_task.rb diff --git a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb index d42061ab324c..1002a735d612 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb @@ -42,12 +42,12 @@ module V2 # @!attribute [r] state # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow::State] # Output only. That status of the workflow. - # @!attribute [rw] create_time + # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] - # Time when the workflow was created. - # @!attribute [rw] last_update_time + # Output only. Time when the workflow was created. + # @!attribute [r] last_update_time # @return [::Google::Protobuf::Timestamp] - # Time when the workflow was last updated. + # Output only. Time when the workflow was last updated. class MigrationWorkflow include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -86,29 +86,43 @@ module State # A single task for a migration which has details about the configuration of # the task. + # @!attribute [rw] assessment_task_details + # @return [::Google::Cloud::Bigquery::Migration::V2::AssessmentTaskDetails] + # Task configuration for Assessment. + # + # Note: The following fields are mutually exclusive: `assessment_task_details`, `translation_config_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] translation_config_details # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationConfigDetails] # Task configuration for CW Batch/Offline SQL Translation. # - # Note: The following fields are mutually exclusive: `translation_config_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `translation_config_details`, `assessment_task_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] translation_details # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationDetails] # Task details for unified SQL Translation. # - # Note: The following fields are mutually exclusive: `translation_details`, `translation_config_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `translation_details`, `assessment_task_details`, `translation_config_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [r] id # @return [::String] # Output only. Immutable. The unique identifier for the migration task. The # ID is server-generated. # @!attribute [rw] type # @return [::String] - # The type of the task. This must be one of the supported task types: - # Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - # Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - # Translation_Snowflake2BQ, Translation_Netezza2BQ, - # Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - # Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - # Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + # The type of the task. This must be one of the supported task types. + # + # Assessment: + # + # - `Assessment_Hive` - Assessment for Hive. + # - `Assessment_Redshift` - Assessment for Redshift. + # - `Assessment_Snowflake` - Assessment for Snowflake. + # - `Assessment_Teradata_v2` - Assessment for Teradata. + # - `Assessment_Oracle` - Assessment for Oracle. + # - `Assessment_Hadoop` - Assessment for Hadoop. + # - `Assessment_Informatica` - Assessment for Informatica. + # + # Translation: + # See [Supported Task + # Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + # for a list of supported task types. # @!attribute [r] state # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask::State] # Output only. The current state of the task. @@ -116,35 +130,37 @@ module State # @return [::Google::Rpc::ErrorInfo] # Output only. An explanation that may be populated when the task is in # FAILED state. - # @!attribute [rw] create_time + # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] - # Time when the task was created. - # @!attribute [rw] last_update_time + # Output only. Time when the task was created. + # @!attribute [r] last_update_time # @return [::Google::Protobuf::Timestamp] - # Time when the task was last updated. + # Output only. Time when the task was last updated. # @!attribute [r] resource_error_details # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] # Output only. Provides details to errors and issues encountered while # processing the task. Presence of error details does not mean that the task # failed. - # @!attribute [rw] resource_error_count + # @!attribute [r] resource_error_count # @return [::Integer] - # The number or resources with errors. Note: This is not the total - # number of errors as each resource can have more than one error. - # This is used to indicate truncation by having a `resource_error_count` - # that is higher than the size of `resource_error_details`. - # @!attribute [rw] metrics + # Output only. The number or resources with errors. Note: This is not the + # total number of errors as each resource can have more than one error. This + # is used to indicate truncation by having a `resource_error_count` that is + # higher than the size of `resource_error_details`. + # @!attribute [r] metrics # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] - # The metrics for the task. + # Output only. The metrics for the task. # @!attribute [r] task_result # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTaskResult] # Output only. The result of the task. - # @!attribute [rw] total_processing_error_count + # @!attribute [r] total_processing_error_count # @return [::Integer] - # Count of all the processing errors in this task and its subtasks. - # @!attribute [rw] total_resource_error_count + # Output only. Count of all the processing errors in this task and its + # subtasks. + # @!attribute [r] total_resource_error_count # @return [::Integer] - # Count of all the resource errors in this task and its subtasks. + # Output only. Count of all the resource errors in this task and its + # subtasks. class MigrationTask include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -163,7 +179,7 @@ module State # The task is running, i.e. its subtasks are ready for execution. RUNNING = 3 - # Tha task is paused. Assigned subtasks can continue, but no new subtasks + # The task is paused. Assigned subtasks can continue, but no new subtasks # will be scheduled. PAUSED = 4 @@ -205,21 +221,21 @@ module State # Output only. Provides details to errors and issues encountered while # processing the subtask. Presence of error details does not mean that the # subtask failed. - # @!attribute [rw] resource_error_count + # @!attribute [r] resource_error_count # @return [::Integer] - # The number or resources with errors. Note: This is not the total - # number of errors as each resource can have more than one error. - # This is used to indicate truncation by having a `resource_error_count` - # that is higher than the size of `resource_error_details`. - # @!attribute [rw] create_time + # Output only. The number or resources with errors. Note: This is not the + # total number of errors as each resource can have more than one error. This + # is used to indicate truncation by having a `resource_error_count` that is + # higher than the size of `resource_error_details`. + # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] - # Time when the subtask was created. - # @!attribute [rw] last_update_time + # Output only. Time when the subtask was created. + # @!attribute [r] last_update_time # @return [::Google::Protobuf::Timestamp] - # Time when the subtask was last updated. - # @!attribute [rw] metrics + # Output only. Time when the subtask was last updated. + # @!attribute [r] metrics # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] - # The metrics for the subtask. + # Output only. The metrics for the subtask. class MigrationSubtask include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -267,6 +283,9 @@ class MigrationTaskResult # @!attribute [rw] report_log_messages # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::GcsReportLogMessage>] # The records from the aggregate CSV report for a migration workflow. + # @!attribute [rw] console_uri + # @return [::String] + # The Cloud Console URI for the migration workflow. class TranslationTaskResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb index d8139e922c8d..4921fcd4f8ed 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb @@ -44,11 +44,59 @@ module V2 # lineage_from_sql_scripts, etc. If not specified, a default set of # targets will be generated. Some additional target types may be slower to # generate. See the documentation for the set of available target types. + # @!attribute [rw] suggestion_config + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionConfig] + # The configuration for the suggestion if requested as a target type. class TranslationDetails include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # The configuration for the suggestion if requested as a target type. + # @!attribute [rw] skip_suggestion_steps + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SuggestionStep>] + # The list of suggestion steps to skip. + class SuggestionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Suggestion step to skip. + # @!attribute [rw] suggestion_type + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::SuggestionType] + # The type of suggestion. + # @!attribute [rw] rewrite_target + # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::RewriteTarget] + # The rewrite target. + class SuggestionStep + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Suggestion type. + module SuggestionType + # Suggestion type unspecified. + SUGGESTION_TYPE_UNSPECIFIED = 0 + + # Query customization. + QUERY_CUSTOMIZATION = 1 + + # Translation explanation. + TRANSLATION_EXPLANATION = 2 + end + + # The target to apply the suggestion to. + module RewriteTarget + # Rewrite target unspecified. + REWRITE_TARGET_UNSPECIFIED = 0 + + # Source SQL. + SOURCE_SQL = 1 + + # Target SQL. + TARGET_SQL = 2 + end + end + # Represents one mapping from a source SQL to a target SQL. # @!attribute [rw] source_spec # @return [::Google::Cloud::Bigquery::Migration::V2::SourceSpec] @@ -66,12 +114,17 @@ class SourceTargetMapping # @return [::String] # The base URI for all files to be read in as sources for translation. # - # Note: The following fields are mutually exclusive: `base_uri`, `literal`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `base_uri`, `literal`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] literal # @return [::Google::Cloud::Bigquery::Migration::V2::Literal] # Source literal. # - # Note: The following fields are mutually exclusive: `literal`, `base_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # Note: The following fields are mutually exclusive: `literal`, `base_uri`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gcs_file_path + # @return [::String] + # The path to a single source file in Cloud Storage. + # + # Note: The following fields are mutually exclusive: `gcs_file_path`, `base_uri`, `literal`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] encoding # @return [::String] # Optional. The optional field to specify the encoding of the sql bytes. diff --git a/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb index f03ded9662e7..2af9829f0062 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb @@ -302,17 +302,17 @@ class BadRequest # In this example, in proto `field` could take one of the following values: # # * `full_name` for a violation in the `full_name` value - # * `email_addresses[1].email` for a violation in the `email` field of the + # * `email_addresses[0].email` for a violation in the `email` field of the # first `email_addresses` message - # * `email_addresses[3].type[2]` for a violation in the second `type` + # * `email_addresses[2].type[1]` for a violation in the second `type` # value in the third `email_addresses` message. # # In JSON, the same values are represented as: # # * `fullName` for a violation in the `fullName` value - # * `emailAddresses[1].email` for a violation in the `email` field of the + # * `emailAddresses[0].email` for a violation in the `email` field of the # first `emailAddresses` message - # * `emailAddresses[3].type[2]` for a violation in the second `type` + # * `emailAddresses[2].type[1]` for a violation in the second `type` # value in the third `emailAddresses` message. # @!attribute [rw] description # @return [::String] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore b/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -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-migration-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json deleted file mode 100644 index 519979303a46..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "bigquerymigration.googleapis.com", - "api_shortname": "bigquerymigration", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest", - "distribution_name": "google-cloud-bigquery-migration-v2", - "is_cloud": true, - "language": "ruby", - "name": "bigquerymigration", - "name_pretty": "BigQuery Migration V2 API", - "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/migration-intro", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml deleted file mode 100644 index 57be07ac546b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-migration-v2.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-migration-v2.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.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-migration-v2/.yardopts b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts deleted file mode 100644 index e1a4dd51c1ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Migration V2 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-migration-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md deleted file mode 100644 index 49431cec3789..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-migration-v2 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-migration-v2 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/migration/v2" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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/migration/v2" - -::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-migration-v2 -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/migration/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-migration-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile +++ /dev/null @@ -1,14 +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-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-migration-v2/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md deleted file mode 100644 index 1b3d10929b14..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Migration V2 API - -The migration service, exposing apis for migration jobs operations, and agent management. - -The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. - -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 Migration V2 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-migration](https://rubygems.org/gems/google-cloud-bigquery-migration). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-migration-v2 -``` - -## 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/bigquerymigration.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/migration/v2" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new -request = ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new # (request fields as keyword arguments...) -response = client.create_migration_workflow request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs/migration-intro) -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/migration/v2" -require "logger" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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.0+. - -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-migration`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-migration-v2`. -_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-migration`. -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-migration-v2`. - -### 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-migration-v2/Rakefile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile deleted file mode 100644 index 22b1470bce3b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_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 GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/migration/v2/migration_service/credentials" - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_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-migration-v2 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-migration-v2 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-migration-v2 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-migration-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-migration-v2" - header "google-cloud-bigquery-migration-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-migration-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-migration-v2 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-migration-v2 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-migration-v2 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-migration-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json deleted file mode 100644 index da3bd8bcce33..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.migration.v2", - "libraryPackage": "::Google::Cloud::Bigquery::Migration::V2", - "services": { - "MigrationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client", - "rpcs": { - "CreateMigrationWorkflow": { - "methods": [ - "create_migration_workflow" - ] - }, - "GetMigrationWorkflow": { - "methods": [ - "get_migration_workflow" - ] - }, - "ListMigrationWorkflows": { - "methods": [ - "list_migration_workflows" - ] - }, - "DeleteMigrationWorkflow": { - "methods": [ - "delete_migration_workflow" - ] - }, - "StartMigrationWorkflow": { - "methods": [ - "start_migration_workflow" - ] - }, - "GetMigrationSubtask": { - "methods": [ - "get_migration_subtask" - ] - }, - "ListMigrationSubtasks": { - "methods": [ - "list_migration_subtasks" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec deleted file mode 100644 index 1050650c896d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/migration/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-migration-v2" - gem.version = Google::Cloud::Bigquery::Migration::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details." - gem.summary = "The migration service, exposing apis for migration jobs operations, and agent management." - 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.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb deleted file mode 100644 index c91652afe47e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.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/migration/v2" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb deleted file mode 100644 index a9ad338b1127..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.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! - -require "google/cloud/bigquery/migration/v2/migration_service" -require "google/cloud/bigquery/migration/v2/version" - -module Google - module Cloud - module Bigquery - module Migration - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/migration/v2" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/migration/v2" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module V2 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/bigquery/migration/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb deleted file mode 100644 index 64ad22c7c8c2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/migration_entities.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/migration/v2/assessment_task_pb' -require 'google/cloud/bigquery/migration/v2/migration_error_details_pb' -require 'google/cloud/bigquery/migration/v2/migration_metrics_pb' -require 'google/cloud/bigquery/migration/v2/translation_config_pb' -require 'google/cloud/bigquery/migration/v2/translation_details_pb' -require 'google/cloud/bigquery/migration/v2/translation_usability_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/error_details_pb' - - -descriptor_data = "\n;google/cloud/bigquery/migration/v2/migration_entities.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/bigquery/migration/v2/assessment_task.proto\x1a@google/cloud/bigquery/migration/v2/migration_error_details.proto\x1a:google/cloud/bigquery/migration/v2/migration_metrics.proto\x1a;google/cloud/bigquery/migration/v2/translation_config.proto\x1agoogle/cloud/bigquery/migration/v2/translation_usability.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/rpc/error_details.proto\"\x80\x05\n\x11MigrationWorkflow\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12O\n\x05tasks\x18\x02 \x03(\x0b\x32@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\n\x05state\x18\x03 \x01(\x0e\x32;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a_\n\nTasksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.MigrationTask:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\r\n\tCOMPLETED\x10\x04:u\xea\x41r\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\n\x06points\x18\x04 \x03(\x0b\x32).google.cloud.bigquery.migration.v2.PointB\x03\xe0\x41\x02\"\x8a\x01\n\x05Point\x12\x42\n\x08interval\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.TimeInterval\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.migration.v2.TypedValue\"v\n\x0cTimeInterval\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xaa\x01\n\nTypedValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x36\n\x12\x64istribution_value\x18\x05 \x01(\x0b\x32\x18.google.api.DistributionH\x00\x42\x07\n\x05valueB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationMetricsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TimeSeries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeSeries").msgclass - Point = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Point").msgclass - TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeInterval").msgclass - TypedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TypedValue").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb deleted file mode 100644 index 2d48893a2487..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb +++ /dev/null @@ -1,57 +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/migration/v2/version" - -require "google/cloud/bigquery/migration/v2/migration_service/credentials" -require "google/cloud/bigquery/migration/v2/migration_service/paths" -require "google/cloud/bigquery/migration/v2/migration_service/client" -require "google/cloud/bigquery/migration/v2/migration_service/rest" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - ## - # Service to handle EDW migrations. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/migration/v2/migration_service" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/migration/v2/migration_service/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module MigrationService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "migration_service", "helpers.rb" -require "google/cloud/bigquery/migration/v2/migration_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb deleted file mode 100644 index 9996d48313f8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb +++ /dev/null @@ -1,1101 +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/migration/v2/migration_service_pb" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - ## - # Client for the MigrationService service. - # - # Service to handle EDW migrations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :migration_service_stub - - ## - # Configure the MigrationService Client class. - # - # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MigrationService clients - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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", "Migration", "V2"] - 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_migration_workflow.timeout = 60.0 - - default_config.rpcs.get_migration_workflow.timeout = 60.0 - default_config.rpcs.get_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_migration_workflows.timeout = 60.0 - default_config.rpcs.list_migration_workflows.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_migration_workflow.timeout = 60.0 - - default_config.rpcs.start_migration_workflow.timeout = 60.0 - default_config.rpcs.start_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the MigrationService 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::Migration::V2::MigrationService::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 - @migration_service_stub.universe_domain - end - - ## - # Create a new MigrationService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MigrationService 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/migration/v2/migration_service_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 - - @migration_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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 - ) - - @migration_service_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 - @migration_service_stub.logger - end - - # Service calls - - ## - # Creates a migration workflow. - # - # @overload create_migration_workflow(request, options = nil) - # Pass arguments to `create_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::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_migration_workflow(parent: nil, migration_workflow: nil) - # Pass arguments to `create_migration_workflow` 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 name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] - # Required. The migration workflow to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - # - # # Call the create_migration_workflow method. - # result = client.create_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def create_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest - - # 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_migration_workflow.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::Migration::V2::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_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :create_migration_workflow, 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 a previously created migration workflow. - # - # @overload get_migration_workflow(request, options = nil) - # Pass arguments to `get_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::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_migration_workflow(name: nil, read_mask: nil) - # Pass arguments to `get_migration_workflow` 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. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - # - # # Call the get_migration_workflow method. - # result = client.get_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def get_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest - - # 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_migration_workflow.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::Migration::V2::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_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :get_migration_workflow, 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 - - ## - # Lists previously created migration workflow. - # - # @overload list_migration_workflows(request, options = nil) - # Pass arguments to `list_migration_workflows` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::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 list_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_migration_workflows` 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 project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @param page_size [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @param page_token [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - # - # # Call the list_migration_workflows method. - # result = client.list_migration_workflows request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p item - # end - # - def list_migration_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest - - # 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.list_migration_workflows.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::Migration::V2::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.list_migration_workflows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_migration_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :list_migration_workflows, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a migration workflow by name. - # - # @overload delete_migration_workflow(request, options = nil) - # Pass arguments to `delete_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::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 delete_migration_workflow(name: nil) - # Pass arguments to `delete_migration_workflow` 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. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - # - # # Call the delete_migration_workflow method. - # result = client.delete_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest - - # 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.delete_migration_workflow.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::Migration::V2::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.delete_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :delete_migration_workflow, 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 - - ## - # Starts a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - # - # @overload start_migration_workflow(request, options = nil) - # Pass arguments to `start_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::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 start_migration_workflow(name: nil) - # Pass arguments to `start_migration_workflow` 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. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - # - # # Call the start_migration_workflow method. - # result = client.start_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def start_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest - - # 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.start_migration_workflow.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::Migration::V2::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.start_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :start_migration_workflow, 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 a previously created migration subtask. - # - # @overload get_migration_subtask(request, options = nil) - # Pass arguments to `get_migration_subtask` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::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_migration_subtask(name: nil, read_mask: nil) - # Pass arguments to `get_migration_subtask` 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. The unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - # - # # Call the get_migration_subtask method. - # result = client.get_migration_subtask request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p result - # - def get_migration_subtask request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest - - # 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_migration_subtask.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::Migration::V2::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_migration_subtask.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_migration_subtask.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :get_migration_subtask, 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 - - ## - # Lists previously created migration subtasks. - # - # @overload list_migration_subtasks(request, options = nil) - # Pass arguments to `list_migration_subtasks` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::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 list_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_migration_subtasks` 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 migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @param page_size [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @param page_token [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - # - # # Call the list_migration_subtasks method. - # result = client.list_migration_subtasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p item - # end - # - def list_migration_subtasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest - - # 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.list_migration_subtasks.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::Migration::V2::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.list_migration_subtasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_migration_subtasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :list_migration_subtasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MigrationService API. - # - # This class represents the configuration for MigrationService, - # 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::Migration::V2::MigrationService::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_migration_workflow to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.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::Migration::V2::MigrationService::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. - # * `: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 = "bigquerymigration.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 MigrationService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_migration_workflow - ## - # RPC-specific configuration for `get_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_workflow - ## - # RPC-specific configuration for `list_migration_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_workflows - ## - # RPC-specific configuration for `delete_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_migration_workflow - ## - # RPC-specific configuration for `start_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :start_migration_workflow - ## - # RPC-specific configuration for `get_migration_subtask` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_subtask - ## - # RPC-specific configuration for `list_migration_subtasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_subtasks - - # @private - def initialize parent_rpcs = nil - create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow - @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config - get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow - @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config - list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows - @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config - delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow - @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config - start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow - @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config - get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask - @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config - list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks - @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_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-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb deleted file mode 100644 index db5d89803933..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb +++ /dev/null @@ -1,49 +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 Migration - module V2 - module MigrationService - # Credentials for the MigrationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb deleted file mode 100644 index 21bfeb2669a0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb +++ /dev/null @@ -1,92 +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 Migration - module V2 - module MigrationService - # Path helper methods for the MigrationService API. - module Paths - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified MigrationSubtask resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # @param subtask [String] - # - # @return [::String] - def migration_subtask_path project:, location:, workflow:, subtask: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workflow cannot contain /" if workflow.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workflows/#{workflow}/subtasks/#{subtask}" - end - - ## - # Create a fully-qualified MigrationWorkflow resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # - # @return [::String] - def migration_workflow_path project:, location:, workflow: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workflows/#{workflow}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb deleted file mode 100644 index d298ae4f0452..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/migration/v2/version" - -require "google/cloud/bigquery/migration/v2/migration_service/credentials" -require "google/cloud/bigquery/migration/v2/migration_service/paths" -require "google/cloud/bigquery/migration/v2/migration_service/rest/client" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - ## - # Service to handle EDW migrations. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/migration/v2/migration_service/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module MigrationService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/migration/v2/migration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb deleted file mode 100644 index c425938db5a5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb +++ /dev/null @@ -1,1009 +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/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - module Rest - ## - # REST client for the MigrationService service. - # - # Service to handle EDW migrations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :migration_service_stub - - ## - # Configure the MigrationService Client class. - # - # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MigrationService clients - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::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", "Migration", "V2"] - 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_migration_workflow.timeout = 60.0 - - default_config.rpcs.get_migration_workflow.timeout = 60.0 - default_config.rpcs.get_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_migration_workflows.timeout = 60.0 - default_config.rpcs.list_migration_workflows.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_migration_workflow.timeout = 60.0 - - default_config.rpcs.start_migration_workflow.timeout = 60.0 - default_config.rpcs.start_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the MigrationService 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::Migration::V2::MigrationService::Rest::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 - @migration_service_stub.universe_domain - end - - ## - # Create a new MigrationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MigrationService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # 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 - - @migration_service_stub = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @migration_service_stub.logger(stub: true)&.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 - @migration_service_stub.logger - end - - # Service calls - - ## - # Creates a migration workflow. - # - # @overload create_migration_workflow(request, options = nil) - # Pass arguments to `create_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::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_migration_workflow(parent: nil, migration_workflow: nil) - # Pass arguments to `create_migration_workflow` 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 name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] - # Required. The migration workflow to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - # - # # Call the create_migration_workflow method. - # result = client.create_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def create_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest - - # 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 - call_metadata = @config.rpcs.create_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.create_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a previously created migration workflow. - # - # @overload get_migration_workflow(request, options = nil) - # Pass arguments to `get_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::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_migration_workflow(name: nil, read_mask: nil) - # Pass arguments to `get_migration_workflow` 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. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - # - # # Call the get_migration_workflow method. - # result = client.get_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def get_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest - - # 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 - call_metadata = @config.rpcs.get_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.get_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration workflow. - # - # @overload list_migration_workflows(request, options = nil) - # Pass arguments to `list_migration_workflows` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::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 list_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_migration_workflows` 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 project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @param page_size [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @param page_token [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - # - # # Call the list_migration_workflows method. - # result = client.list_migration_workflows request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p item - # end - # - def list_migration_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest - - # 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 - call_metadata = @config.rpcs.list_migration_workflows.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_migration_workflows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_migration_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.list_migration_workflows request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, "migration_workflows", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a migration workflow by name. - # - # @overload delete_migration_workflow(request, options = nil) - # Pass arguments to `delete_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::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 delete_migration_workflow(name: nil) - # Pass arguments to `delete_migration_workflow` 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. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - # - # # Call the delete_migration_workflow method. - # result = client.delete_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest - - # 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 - call_metadata = @config.rpcs.delete_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.delete_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - # - # @overload start_migration_workflow(request, options = nil) - # Pass arguments to `start_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::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 start_migration_workflow(name: nil) - # Pass arguments to `start_migration_workflow` 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. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - # - # # Call the start_migration_workflow method. - # result = client.start_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def start_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest - - # 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 - call_metadata = @config.rpcs.start_migration_workflow.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.start_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.start_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a previously created migration subtask. - # - # @overload get_migration_subtask(request, options = nil) - # Pass arguments to `get_migration_subtask` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::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_migration_subtask(name: nil, read_mask: nil) - # Pass arguments to `get_migration_subtask` 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. The unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - # - # # Call the get_migration_subtask method. - # result = client.get_migration_subtask request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p result - # - def get_migration_subtask request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest - - # 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 - call_metadata = @config.rpcs.get_migration_subtask.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_migration_subtask.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_migration_subtask.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.get_migration_subtask request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration subtasks. - # - # @overload list_migration_subtasks(request, options = nil) - # Pass arguments to `list_migration_subtasks` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::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 list_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_migration_subtasks` 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 migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @param page_size [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @param page_token [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - # - # # Call the list_migration_subtasks method. - # result = client.list_migration_subtasks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p item - # end - # - def list_migration_subtasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest - - # 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 - call_metadata = @config.rpcs.list_migration_subtasks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_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::Migration::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_migration_subtasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_migration_subtasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.list_migration_subtasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, "migration_subtasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MigrationService REST API. - # - # This class represents the configuration for MigrationService REST, - # 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::Migration::V2::MigrationService::Rest::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_migration_workflow to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.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: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`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)) - # * (`nil`) indicating no credentials - # - # 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] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional 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. - # * `: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 = "bigquerymigration.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.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 :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 RPC class for the MigrationService 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 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_migration_workflow - ## - # RPC-specific configuration for `get_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_workflow - ## - # RPC-specific configuration for `list_migration_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_workflows - ## - # RPC-specific configuration for `delete_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_migration_workflow - ## - # RPC-specific configuration for `start_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :start_migration_workflow - ## - # RPC-specific configuration for `get_migration_subtask` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_subtask - ## - # RPC-specific configuration for `list_migration_subtasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_subtasks - - # @private - def initialize parent_rpcs = nil - create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow - @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config - get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow - @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config - list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows - @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config - delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow - @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config - start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow - @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config - get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask - @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config - list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks - @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb deleted file mode 100644 index 21756920f3bf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb +++ /dev/null @@ -1,512 +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/migration/v2/migration_service_pb" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - module Rest - ## - # REST service stub for the MigrationService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: false, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # A result object deserialized from the server's reply - def create_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_migration_workflow_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # A result object deserialized from the server's reply - def get_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_workflow_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_migration_workflows REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] - # A result object deserialized from the server's reply - def list_migration_workflows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_workflows_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_migration_workflows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_migration_workflow_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the start_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def start_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_migration_workflow_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "start_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_migration_subtask REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # A result object deserialized from the server's reply - def get_migration_subtask request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_subtask_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_migration_subtask", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_migration_subtasks REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] - # A result object deserialized from the server's reply - def list_migration_subtasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_subtasks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_migration_subtasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/workflows", - body: "migration_workflow", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_migration_workflows REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_migration_workflows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/workflows", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_migration_subtask REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_migration_subtask_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/subtasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_migration_subtasks REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_migration_subtasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/subtasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb deleted file mode 100644 index 22bab24f5771..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_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/migration/v2/migration_service.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/migration/v2/migration_entities_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n:google/cloud/bigquery/migration/v2/migration_service.proto\x12\"google.cloud.bigquery.migration.v2\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/migration/v2/migration_entities.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb3\x01\n\x1e\x43reateMigrationWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x12migration_workflow\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflowB\x03\xe0\x41\x02\"\x96\x01\n\x1bGetMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb0\x01\n\x1dListMigrationWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8d\x01\n\x1eListMigrationWorkflowsResponse\x12R\n\x13migration_workflows\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1e\x44\x65leteMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"i\n\x1dStartMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"\x99\x01\n\x1aGetMigrationSubtaskRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1bigquerymigration.googleapis.com/MigrationSubtask\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xe4\x01\n\x1cListMigrationSubtasksRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x1dListMigrationSubtasksResponse\x12P\n\x12migration_subtasks\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb\x0c\n\x10MigrationService\x12\xfb\x01\n\x17\x43reateMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"e\xda\x41\x19parent,migration_workflow\x82\xd3\xe4\x93\x02\x43\"-/v2/{parent=projects/*/locations/*}/workflows:\x12migration_workflow\x12\xcc\x01\n\x14GetMigrationWorkflow\x12?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/workflows/*}\x12\xdf\x01\n\x16ListMigrationWorkflows\x12\x41.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest\x1a\x42.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/workflows\x12\xb3\x01\n\x17\x44\x65leteMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/workflows/*}\x12\xba\x01\n\x16StartMigrationWorkflow\x12\x41.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/workflows/*}:start:\x01*\x12\xd4\x01\n\x13GetMigrationSubtask\x12>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest\x1a\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}\x12\xe7\x01\n\x15ListMigrationSubtasks\x12@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest\x1a\x41.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/locations/*/workflows/*}/subtasks\x1aT\xca\x41 bigquerymigration.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationServiceProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - CreateMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest").msgclass - GetMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest").msgclass - ListMigrationWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest").msgclass - ListMigrationWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse").msgclass - DeleteMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest").msgclass - StartMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest").msgclass - GetMigrationSubtaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest").msgclass - ListMigrationSubtasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest").msgclass - ListMigrationSubtasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb deleted file mode 100644 index 8984838dfd6d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/migration/v2/migration_service.proto for package 'google.cloud.bigquery.migration.v2' -# 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/migration/v2/migration_service_pb' - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - # Service to handle EDW migrations. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.migration.v2.MigrationService' - - # Creates a migration workflow. - rpc :CreateMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow - # Gets a previously created migration workflow. - rpc :GetMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow - # Lists previously created migration workflow. - rpc :ListMigrationWorkflows, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse - # Deletes a migration workflow by name. - rpc :DeleteMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Google::Protobuf::Empty - # Starts a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - rpc :StartMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Google::Protobuf::Empty - # Gets a previously created migration subtask. - rpc :GetMigrationSubtask, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask - # Lists previously created migration subtasks. - rpc :ListMigrationSubtasks, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb deleted file mode 100644 index 76d58e045e9e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb +++ /dev/null @@ -1,39 +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/migration/v2/migration_service/rest" -require "google/cloud/bigquery/migration/v2/version" - -module Google - module Cloud - module Bigquery - module Migration - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/migration/v2/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module V2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb deleted file mode 100644 index 26de688def6d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n;google/cloud/bigquery/migration/v2/translation_config.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe0\x03\n\x18TranslationConfigDetails\x12\x19\n\x0fgcs_source_path\x18\x01 \x01(\tH\x00\x12\x19\n\x0fgcs_target_path\x18\x02 \x01(\tH\x01\x12V\n\x11name_mapping_list\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.migration.v2.ObjectNameMappingListH\x02\x12\x43\n\x0esource_dialect\x18\x03 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x43\n\x0etarget_dialect\x18\x04 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x41\n\nsource_env\x18\x06 \x01(\x0b\x32-.google.cloud.bigquery.migration.v2.SourceEnv\x12\x16\n\x0erequest_source\x18\x08 \x01(\t\x12\x14\n\x0ctarget_types\x18\t \x03(\tB\x11\n\x0fsource_locationB\x11\n\x0ftarget_locationB\x15\n\x13output_name_mapping\"\xeb\n\n\x07\x44ialect\x12O\n\x10\x62igquery_dialect\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.BigQueryDialectH\x00\x12K\n\x0ehiveql_dialect\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.HiveQLDialectH\x00\x12O\n\x10redshift_dialect\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.RedshiftDialectH\x00\x12O\n\x10teradata_dialect\x18\x04 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.TeradataDialectH\x00\x12K\n\x0eoracle_dialect\x18\x05 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.OracleDialectH\x00\x12O\n\x10sparksql_dialect\x18\x06 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.SparkSQLDialectH\x00\x12Q\n\x11snowflake_dialect\x18\x07 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SnowflakeDialectH\x00\x12M\n\x0fnetezza_dialect\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NetezzaDialectH\x00\x12X\n\x15\x61zure_synapse_dialect\x18\t \x01(\x0b\x32\x37.google.cloud.bigquery.migration.v2.AzureSynapseDialectH\x00\x12M\n\x0fvertica_dialect\x18\n \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.VerticaDialectH\x00\x12R\n\x12sql_server_dialect\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SQLServerDialectH\x00\x12S\n\x12postgresql_dialect\x18\x0c \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.PostgresqlDialectH\x00\x12K\n\x0epresto_dialect\x18\r \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.PrestoDialectH\x00\x12I\n\rmysql_dialect\x18\x0e \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.MySQLDialectH\x00\x12\x45\n\x0b\x64\x62\x32_dialect\x18\x0f \x01(\x0b\x32..google.cloud.bigquery.migration.v2.DB2DialectH\x00\x12K\n\x0esqlite_dialect\x18\x10 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.SQLiteDialectH\x00\x12Q\n\x11greenplum_dialect\x18\x11 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.GreenplumDialectH\x00\x42\x0f\n\rdialect_value\"\x11\n\x0f\x42igQueryDialect\"\x0f\n\rHiveQLDialect\"\x11\n\x0fRedshiftDialect\"\x8a\x01\n\x0fTeradataDialect\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.bigquery.migration.v2.TeradataDialect.Mode\"/\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x07\n\x03SQL\x10\x01\x12\x08\n\x04\x42TEQ\x10\x02\"\x0f\n\rOracleDialect\"\x11\n\x0fSparkSQLDialect\"\x12\n\x10SnowflakeDialect\"\x10\n\x0eNetezzaDialect\"\x15\n\x13\x41zureSynapseDialect\"\x10\n\x0eVerticaDialect\"\x12\n\x10SQLServerDialect\"\x13\n\x11PostgresqlDialect\"\x0f\n\rPrestoDialect\"\x0e\n\x0cMySQLDialect\"\x0c\n\nDB2Dialect\"\x0f\n\rSQLiteDialect\"\x12\n\x10GreenplumDialect\"`\n\x15ObjectNameMappingList\x12G\n\x08name_map\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.ObjectNameMapping\"\x9d\x01\n\x11ObjectNameMapping\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NameMappingKey\x12\x44\n\x06target\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.NameMappingValue\"\xab\x02\n\x0eNameMappingKey\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.migration.v2.NameMappingKey.Type\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08relation\x18\x04 \x01(\t\x12\x11\n\tattribute\x18\x05 \x01(\t\"\x8a\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x0c\n\x08RELATION\x10\x03\x12\r\n\tATTRIBUTE\x10\x04\x12\x12\n\x0eRELATION_ALIAS\x10\x05\x12\x13\n\x0f\x41TTRIBUTE_ALIAS\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\"Y\n\x10NameMappingValue\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\"f\n\tSourceEnv\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd2\x01\n&com.google.cloud.bigquery.migration.v2B\x16TranslationConfigProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationConfigDetails").msgclass - Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Dialect").msgclass - BigQueryDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.BigQueryDialect").msgclass - HiveQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.HiveQLDialect").msgclass - RedshiftDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.RedshiftDialect").msgclass - TeradataDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect").msgclass - TeradataDialect::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect.Mode").enummodule - OracleDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.OracleDialect").msgclass - SparkSQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SparkSQLDialect").msgclass - SnowflakeDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SnowflakeDialect").msgclass - NetezzaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NetezzaDialect").msgclass - AzureSynapseDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AzureSynapseDialect").msgclass - VerticaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.VerticaDialect").msgclass - SQLServerDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLServerDialect").msgclass - PostgresqlDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PostgresqlDialect").msgclass - PrestoDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PrestoDialect").msgclass - MySQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.MySQLDialect").msgclass - DB2Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DB2Dialect").msgclass - SQLiteDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLiteDialect").msgclass - GreenplumDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GreenplumDialect").msgclass - ObjectNameMappingList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMappingList").msgclass - ObjectNameMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMapping").msgclass - NameMappingKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey").msgclass - NameMappingKey::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey.Type").enummodule - NameMappingValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingValue").msgclass - SourceEnv = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnv").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb deleted file mode 100644 index 52eee84cfd27..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_details.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\n\x07literal\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x17\n\rgcs_file_path\x18\x04 \x01(\tH\x00\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06source\"#\n\nTargetSpec\x12\x15\n\rrelative_path\x18\x01 \x01(\t\"h\n\x07Literal\x12\x18\n\x0eliteral_string\x18\x02 \x01(\tH\x00\x12\x17\n\rliteral_bytes\x18\x03 \x01(\x0cH\x00\x12\x1a\n\rrelative_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0e\n\x0cliteral_data\"n\n\x11SourceEnvironment\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd3\x01\n&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationDetails").msgclass - SuggestionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionConfig").msgclass - SuggestionStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep").msgclass - SuggestionStep::SuggestionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType").enummodule - SuggestionStep::RewriteTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget").enummodule - SourceTargetMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceTargetMapping").msgclass - SourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceSpec").msgclass - TargetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TargetSpec").msgclass - Literal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Literal").msgclass - SourceEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnvironment").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb deleted file mode 100644 index b371a88bb83b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_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/migration/v2/translation_suggestion.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n?google/cloud/bigquery/migration/v2/translation_suggestion.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x88\x02\n\x17TranslationReportRecord\x12V\n\x08severity\x18\x01 \x01(\x0e\x32\x44.google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity\x12\x13\n\x0bscript_line\x18\x02 \x01(\x05\x12\x15\n\rscript_column\x18\x03 \x01(\x05\x12\x10\n\x08\x63\x61tegory\x18\x04 \x01(\t\x12\x0f\n\x07message\x18\x05 \x01(\t\"F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\xd6\x01\n&com.google.cloud.bigquery.migration.v2B\x1aTranslationSuggestionProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationReportRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord").msgclass - TranslationReportRecord::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb deleted file mode 100644 index 840017a9f86a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_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/migration/v2/translation_usability.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n>google/cloud/bigquery/migration/v2/translation_usability.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf6\x01\n\x13GcsReportLogMessage\x12\x10\n\x08severity\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\x12\x11\n\tfile_path\x18\x03 \x01(\t\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x1a\n\x12source_script_line\x18\x05 \x01(\x05\x12\x1c\n\x14source_script_column\x18\x06 \x01(\x05\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x16\n\x0escript_context\x18\x08 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\t \x01(\t\x12\x0e\n\x06\x65\x66\x66\x65\x63t\x18\n \x01(\t\x12\x13\n\x0bobject_name\x18\x0b \x01(\tB\xd5\x01\n&com.google.cloud.bigquery.migration.v2B\x19TranslationUsabilityProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - GcsReportLogMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GcsReportLogMessage").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb deleted file mode 100644 index c33fa4b1c721..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/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 Migration - module V2 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md deleted file mode 100644 index 6a3802be6255..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Migration V2 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-migration-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/api/distribution.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb deleted file mode 100644 index e4f870d5ad0d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb +++ /dev/null @@ -1,233 +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 - # `Distribution` contains summary statistics for a population of values. It - # optionally contains a histogram representing the distribution of those values - # across a set of buckets. - # - # The summary statistics are the count, mean, sum of the squared deviation from - # the mean, the minimum, and the maximum of the set of population of values. - # The histogram is based on a sequence of buckets and gives a count of values - # that fall into each bucket. The boundaries of the buckets are given either - # explicitly or by formulas for buckets of fixed or exponentially increasing - # widths. - # - # Although it is not forbidden, it is generally a bad idea to include - # non-finite values (infinities or NaNs) in the population of values, as this - # will render the `mean` and `sum_of_squared_deviation` fields meaningless. - # @!attribute [rw] count - # @return [::Integer] - # The number of values in the population. Must be non-negative. This value - # must equal the sum of the values in `bucket_counts` if a histogram is - # provided. - # @!attribute [rw] mean - # @return [::Float] - # The arithmetic mean of the values in the population. If `count` is zero - # then this field must be zero. - # @!attribute [rw] sum_of_squared_deviation - # @return [::Float] - # The sum of squared deviations from the mean of the values in the - # population. For values x_i this is: - # - # Sum[i=1..n]((x_i - mean)^2) - # - # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition - # describes Welford's method for accumulating this sum in one pass. - # - # If `count` is zero then this field must be zero. - # @!attribute [rw] range - # @return [::Google::Api::Distribution::Range] - # If specified, contains the range of the population values. The field - # must not be present if the `count` is zero. - # @!attribute [rw] bucket_options - # @return [::Google::Api::Distribution::BucketOptions] - # Defines the histogram bucket boundaries. If the distribution does not - # contain a histogram, then omit this field. - # @!attribute [rw] bucket_counts - # @return [::Array<::Integer>] - # The number of values in each bucket of the histogram, as described in - # `bucket_options`. If the distribution does not have a histogram, then omit - # this field. If there is a histogram, then the sum of the values in - # `bucket_counts` must equal the value in the `count` field of the - # distribution. - # - # If present, `bucket_counts` should contain N values, where N is the number - # of buckets specified in `bucket_options`. If you supply fewer than N - # values, the remaining values are assumed to be 0. - # - # The order of the values in `bucket_counts` follows the bucket numbering - # schemes described for the three bucket types. The first value must be the - # count for the underflow bucket (number 0). The next N-2 values are the - # counts for the finite buckets (number 1 through N-2). The N'th value in - # `bucket_counts` is the count for the overflow bucket (number N-1). - # @!attribute [rw] exemplars - # @return [::Array<::Google::Api::Distribution::Exemplar>] - # Must be in increasing order of `value` field. - class Distribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The range of the population values. - # @!attribute [rw] min - # @return [::Float] - # The minimum of the population values. - # @!attribute [rw] max - # @return [::Float] - # The maximum of the population values. - class Range - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BucketOptions` describes the bucket boundaries used to create a histogram - # for the distribution. The buckets can be in a linear sequence, an - # exponential sequence, or each bucket can be specified explicitly. - # `BucketOptions` does not include the number of values in each bucket. - # - # A bucket has an inclusive lower bound and exclusive upper bound for the - # values that are counted for that bucket. The upper bound of a bucket must - # be strictly greater than the lower bound. The sequence of N buckets for a - # distribution consists of an underflow bucket (number 0), zero or more - # finite buckets (number 1 through N - 2) and an overflow bucket (number N - - # 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the - # same as the upper bound of bucket i - 1. The buckets span the whole range - # of finite values: lower bound of the underflow bucket is -infinity and the - # upper bound of the overflow bucket is +infinity. The finite buckets are - # so-called because both bounds are finite. - # @!attribute [rw] linear_buckets - # @return [::Google::Api::Distribution::BucketOptions::Linear] - # The linear bucket. - # - # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exponential_buckets - # @return [::Google::Api::Distribution::BucketOptions::Exponential] - # The exponential buckets. - # - # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] explicit_buckets - # @return [::Google::Api::Distribution::BucketOptions::Explicit] - # The explicit buckets. - # - # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BucketOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies a linear sequence of buckets that all have the same width - # (except overflow and underflow). Each bucket represents a constant - # absolute uncertainty on the specific value in the bucket. - # - # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - # following boundaries: - # - # Upper bound (0 <= i < N-1): offset + (width * i). - # - # Lower bound (1 <= i < N): offset + (width * (i - 1)). - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # Must be greater than 0. - # @!attribute [rw] width - # @return [::Float] - # Must be greater than 0. - # @!attribute [rw] offset - # @return [::Float] - # Lower bound of the first bucket. - class Linear - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies an exponential sequence of buckets that have a width that is - # proportional to the value of the lower bound. Each bucket represents a - # constant relative uncertainty on a specific value in the bucket. - # - # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - # following boundaries: - # - # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). - # - # Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # Must be greater than 0. - # @!attribute [rw] growth_factor - # @return [::Float] - # Must be greater than 1. - # @!attribute [rw] scale - # @return [::Float] - # Must be greater than 0. - class Exponential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a set of buckets with arbitrary widths. - # - # There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following - # boundaries: - # - # Upper bound (0 <= i < N-1): bounds[i] - # Lower bound (1 <= i < N); bounds[i - 1] - # - # The `bounds` field must contain at least one element. If `bounds` has - # only one element, then there are no finite buckets, and that single - # element is the common boundary of the overflow and underflow buckets. - # @!attribute [rw] bounds - # @return [::Array<::Float>] - # The values must be monotonically increasing. - class Explicit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Exemplars are example points that may be used to annotate aggregated - # distribution values. They are metadata that gives information about a - # particular value added to a Distribution bucket, such as a trace ID that - # was active when a value was added. They may contain further information, - # such as a example values and timestamps, origin, etc. - # @!attribute [rw] value - # @return [::Float] - # Value of the exemplar point. This value determines to which bucket the - # exemplar belongs. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # The observation (sampling) time of the above value. - # @!attribute [rw] attachments - # @return [::Array<::Google::Protobuf::Any>] - # Contextual information about the example value. Examples are: - # - # Trace: type.googleapis.com/google.monitoring.v3.SpanContext - # - # Literal string: type.googleapis.com/google.protobuf.StringValue - # - # Labels dropped during aggregation: - # type.googleapis.com/google.monitoring.v3.DroppedLabels - # - # There may be only a single attachment of any given message type in a - # single exemplar, and this is enforced by the system. - class Exemplar - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb deleted file mode 100644 index 02d2f8d451f9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb +++ /dev/null @@ -1,49 +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 description of a label. - # @!attribute [rw] key - # @return [::String] - # The label key. - # @!attribute [rw] value_type - # @return [::Google::Api::LabelDescriptor::ValueType] - # The type of data that can be assigned to the label. - # @!attribute [rw] description - # @return [::String] - # A human-readable description for the label. - class LabelDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value types that can be used as label values. - module ValueType - # A variable-length string. This is the default. - STRING = 0 - - # Boolean; true or false. - BOOL = 1 - - # A 64-bit signed integer. - INT64 = 2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/api/metric.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb deleted file mode 100644 index 56510feeee0f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb +++ /dev/null @@ -1,299 +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 - # Defines a metric type and its schema. Once a metric descriptor is created, - # deleting or altering it stops data collection and makes the metric type's - # existing data unusable. - # @!attribute [rw] name - # @return [::String] - # The resource name of the metric descriptor. - # @!attribute [rw] type - # @return [::String] - # The metric type, including its DNS name prefix. The type is not - # URL-encoded. All user-defined metric types have the DNS name - # `custom.googleapis.com` or `external.googleapis.com`. Metric types should - # use a natural hierarchical grouping. For example: - # - # "custom.googleapis.com/invoice/paid/amount" - # "external.googleapis.com/prometheus/up" - # "appengine.googleapis.com/http/server/response_latencies" - # @!attribute [rw] labels - # @return [::Array<::Google::Api::LabelDescriptor>] - # The set of labels that can be used to describe a specific - # instance of this metric type. For example, the - # `appengine.googleapis.com/http/server/response_latencies` metric - # type has a label for the HTTP response code, `response_code`, so - # you can look at latencies for successful responses or just - # for responses that failed. - # @!attribute [rw] metric_kind - # @return [::Google::Api::MetricDescriptor::MetricKind] - # Whether the metric records instantaneous values, changes to a value, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # @!attribute [rw] value_type - # @return [::Google::Api::MetricDescriptor::ValueType] - # Whether the measurement is an integer, a floating-point number, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # @!attribute [rw] unit - # @return [::String] - # The units in which the metric value is reported. It is only applicable - # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - # defines the representation of the stored metric values. - # - # Different systems might scale the values to be more easily displayed (so a - # value of `0.02kBy` _might_ be displayed as `20By`, and a value of - # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is - # `kBy`, then the value of the metric is always in thousands of bytes, no - # matter how it might be displayed. - # - # If you want a custom metric to record the exact number of CPU-seconds used - # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is - # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 - # CPU-seconds, then the value is written as `12005`. - # - # Alternatively, if you want a custom metric to record data in a more - # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is - # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), - # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). - # - # The supported units are a subset of [The Unified Code for Units of - # Measure](https://unitsofmeasure.org/ucum.html) standard: - # - # **Basic units (UNIT)** - # - # * `bit` bit - # * `By` byte - # * `s` second - # * `min` minute - # * `h` hour - # * `d` day - # * `1` dimensionless - # - # **Prefixes (PREFIX)** - # - # * `k` kilo (10^3) - # * `M` mega (10^6) - # * `G` giga (10^9) - # * `T` tera (10^12) - # * `P` peta (10^15) - # * `E` exa (10^18) - # * `Z` zetta (10^21) - # * `Y` yotta (10^24) - # - # * `m` milli (10^-3) - # * `u` micro (10^-6) - # * `n` nano (10^-9) - # * `p` pico (10^-12) - # * `f` femto (10^-15) - # * `a` atto (10^-18) - # * `z` zepto (10^-21) - # * `y` yocto (10^-24) - # - # * `Ki` kibi (2^10) - # * `Mi` mebi (2^20) - # * `Gi` gibi (2^30) - # * `Ti` tebi (2^40) - # * `Pi` pebi (2^50) - # - # **Grammar** - # - # The grammar also includes these connectors: - # - # * `/` division or ratio (as an infix operator). For examples, - # `kBy/{email}` or `MiBy/10ms` (although you should almost never - # have `/s` in a metric `unit`; rates should always be computed at - # query time from the underlying cumulative or delta value). - # * `.` multiplication or composition (as an infix operator). For - # examples, `GBy.d` or `k{watt}.h`. - # - # The grammar for a unit is as follows: - # - # Expression = Component { "." Component } { "/" Component } ; - # - # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] - # | Annotation - # | "1" - # ; - # - # Annotation = "{" NAME "}" ; - # - # Notes: - # - # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation - # is used alone, then the unit is equivalent to `1`. For examples, - # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. - # * `NAME` is a sequence of non-blank printable ASCII characters not - # containing `{` or `}`. - # * `1` represents a unitary [dimensionless - # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such - # as in `1/s`. It is typically used when none of the basic units are - # appropriate. For example, "new users per day" can be represented as - # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new - # users). Alternatively, "thousands of page views per day" would be - # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric - # value of `5.3` would mean "5300 page views per day"). - # * `%` represents dimensionless value of 1/100, and annotates values giving - # a percentage (so the metric values are typically in the range of 0..100, - # and a metric value `3` means "3 percent"). - # * `10^2.%` indicates a metric contains a ratio, typically in the range - # 0..1, that will be multiplied by 100 and displayed as a percentage - # (so a metric value `0.03` means "3 percent"). - # @!attribute [rw] description - # @return [::String] - # A detailed description of the metric, which can be used in documentation. - # @!attribute [rw] display_name - # @return [::String] - # A concise name for the metric, which can be displayed in user interfaces. - # Use sentence case without an ending period, for example "Request count". - # This field is optional but it is recommended to be set for any metrics - # associated with user-visible concepts, such as Quota. - # @!attribute [rw] metadata - # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata] - # Optional. Metadata which can be used to guide usage of the metric. - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Optional. The launch stage of the metric definition. - # @!attribute [rw] monitored_resource_types - # @return [::Array<::String>] - # Read-only. If present, then a [time - # series][google.monitoring.v3.TimeSeries], which is identified partially by - # a metric type and a - # [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that - # is associated with this metric type can only be associated with one of the - # monitored resource types listed here. - class MetricDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional annotations that can be used to guide the usage of a metric. - # @!attribute [rw] launch_stage - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Api::LaunchStage] - # Deprecated. Must use the - # {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} - # instead. - # @!attribute [rw] sample_period - # @return [::Google::Protobuf::Duration] - # The sampling period of metric data points. For metrics which are written - # periodically, consecutive data points are stored at this time interval, - # excluding data loss due to errors. Metrics with a higher granularity have - # a smaller sampling period. - # @!attribute [rw] ingest_delay - # @return [::Google::Protobuf::Duration] - # The delay of data points caused by ingestion. Data points older than this - # age are guaranteed to be ingested and available to be read, excluding - # data loss due to errors. - # @!attribute [rw] time_series_resource_hierarchy_level - # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>] - # The scope of the timeseries data of the metric. - class MetricDescriptorMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The resource hierarchy level of the timeseries data of a metric. - module TimeSeriesResourceHierarchyLevel - # Do not use this default value. - TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0 - - # Scopes a metric to a project. - PROJECT = 1 - - # Scopes a metric to an organization. - ORGANIZATION = 2 - - # Scopes a metric to a folder. - FOLDER = 3 - end - end - - # The kind of measurement. It describes how the data is reported. - # For information on setting the start time and end time based on - # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. - module MetricKind - # Do not use this default value. - METRIC_KIND_UNSPECIFIED = 0 - - # An instantaneous measurement of a value. - GAUGE = 1 - - # The change in a value during a time interval. - DELTA = 2 - - # A value accumulated over a time interval. Cumulative - # measurements in a time series should have the same start time - # and increasing end times, until an event resets the cumulative - # value to zero and sets a new start time for the following - # points. - CUMULATIVE = 3 - end - - # The value type of a metric. - module ValueType - # Do not use this default value. - VALUE_TYPE_UNSPECIFIED = 0 - - # The value is a boolean. - # This value type can be used only if the metric kind is `GAUGE`. - BOOL = 1 - - # The value is a signed 64-bit integer. - INT64 = 2 - - # The value is a double precision floating point number. - DOUBLE = 3 - - # The value is a text string. - # This value type can be used only if the metric kind is `GAUGE`. - STRING = 4 - - # The value is a {::Google::Api::Distribution `Distribution`}. - DISTRIBUTION = 5 - - # The value is money. - MONEY = 6 - end - end - - # A specific metric, identified by specifying values for all of the - # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}. - # @!attribute [rw] type - # @return [::String] - # An existing metric type, see - # {::Google::Api::MetricDescriptor google.api.MetricDescriptor}. For example, - # `custom.googleapis.com/invoice/paid/amount`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The set of label values that uniquely identify this metric. All - # labels listed in the `MetricDescriptor` must be assigned values. - class Metric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb deleted file mode 100644 index 2e38004a68f2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb +++ /dev/null @@ -1,297 +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 Migration - module V2 - # A migration workflow which specifies what needs to be done for an EDW - # migration. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. Identifier. The unique identifier for the migration - # workflow. The ID is server-generated. - # - # Example: `projects/123/locations/us/workflows/345` - # @!attribute [rw] display_name - # @return [::String] - # The display name of the workflow. This can be set to give a workflow - # a descriptive name. There is no guarantee or enforcement of uniqueness. - # @!attribute [rw] tasks - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Migration::V2::MigrationTask}] - # The tasks in a workflow in a named map. The name (i.e. key) has no - # meaning and is merely a convenient way to address a specific task - # in a workflow. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow::State] - # Output only. That status of the workflow. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the workflow was created. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the workflow was last updated. - class MigrationWorkflow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask] - class TasksEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible migration workflow states. - module State - # Workflow state is unspecified. - STATE_UNSPECIFIED = 0 - - # Workflow is in draft status, i.e. tasks are not yet eligible for - # execution. - DRAFT = 1 - - # Workflow is running (i.e. tasks are eligible for execution). - RUNNING = 2 - - # Workflow is paused. Tasks currently in progress may continue, but no - # further tasks will be scheduled. - PAUSED = 3 - - # Workflow is complete. There should not be any task in a non-terminal - # state, but if they are (e.g. forced termination), they will not be - # scheduled. - COMPLETED = 4 - end - end - - # A single task for a migration which has details about the configuration of - # the task. - # @!attribute [rw] assessment_task_details - # @return [::Google::Cloud::Bigquery::Migration::V2::AssessmentTaskDetails] - # Task configuration for Assessment. - # - # Note: The following fields are mutually exclusive: `assessment_task_details`, `translation_config_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_config_details - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationConfigDetails] - # Task configuration for CW Batch/Offline SQL Translation. - # - # Note: The following fields are mutually exclusive: `translation_config_details`, `assessment_task_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_details - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationDetails] - # Task details for unified SQL Translation. - # - # Note: The following fields are mutually exclusive: `translation_details`, `assessment_task_details`, `translation_config_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] id - # @return [::String] - # Output only. Immutable. The unique identifier for the migration task. The - # ID is server-generated. - # @!attribute [rw] type - # @return [::String] - # The type of the task. This must be one of the supported task types. - # - # Assessment: - # - # - `Assessment_Hive` - Assessment for Hive. - # - `Assessment_Redshift` - Assessment for Redshift. - # - `Assessment_Snowflake` - Assessment for Snowflake. - # - `Assessment_Teradata_v2` - Assessment for Teradata. - # - `Assessment_Oracle` - Assessment for Oracle. - # - `Assessment_Hadoop` - Assessment for Hadoop. - # - `Assessment_Informatica` - Assessment for Informatica. - # - # Translation: - # See [Supported Task - # Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) - # for a list of supported task types. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask::State] - # Output only. The current state of the task. - # @!attribute [r] processing_error - # @return [::Google::Rpc::ErrorInfo] - # Output only. An explanation that may be populated when the task is in - # FAILED state. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the task was created. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the task was last updated. - # @!attribute [r] resource_error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] - # Output only. Provides details to errors and issues encountered while - # processing the task. Presence of error details does not mean that the task - # failed. - # @!attribute [r] resource_error_count - # @return [::Integer] - # Output only. The number or resources with errors. Note: This is not the - # total number of errors as each resource can have more than one error. This - # is used to indicate truncation by having a `resource_error_count` that is - # higher than the size of `resource_error_details`. - # @!attribute [r] metrics - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] - # Output only. The metrics for the task. - # @!attribute [r] task_result - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTaskResult] - # Output only. The result of the task. - # @!attribute [r] total_processing_error_count - # @return [::Integer] - # Output only. Count of all the processing errors in this task and its - # subtasks. - # @!attribute [r] total_resource_error_count - # @return [::Integer] - # Output only. Count of all the resource errors in this task and its - # subtasks. - class MigrationTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a migration task. - module State - # The state is unspecified. - STATE_UNSPECIFIED = 0 - - # The task is waiting for orchestration. - PENDING = 1 - - # The task is assigned to an orchestrator. - ORCHESTRATING = 2 - - # The task is running, i.e. its subtasks are ready for execution. - RUNNING = 3 - - # The task is paused. Assigned subtasks can continue, but no new subtasks - # will be scheduled. - PAUSED = 4 - - # The task finished successfully. - SUCCEEDED = 5 - - # The task finished unsuccessfully. - FAILED = 6 - end - end - - # A subtask for a migration which carries details about the configuration of - # the subtask. The content of the details should not matter to the end user, - # but is a contract between the subtask creator and subtask worker. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. The resource name for the migration subtask. The ID - # is server-generated. - # - # Example: `projects/123/locations/us/workflows/345/subtasks/678` - # @!attribute [rw] task_id - # @return [::String] - # The unique ID of the task to which this subtask belongs. - # @!attribute [rw] type - # @return [::String] - # The type of the Subtask. The migration service does not check whether this - # is a known type. It is up to the task creator (i.e. orchestrator or worker) - # to ensure it only creates subtasks for which there are compatible workers - # polling for Subtasks. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask::State] - # Output only. The current state of the subtask. - # @!attribute [r] processing_error - # @return [::Google::Rpc::ErrorInfo] - # Output only. An explanation that may be populated when the task is in - # FAILED state. - # @!attribute [r] resource_error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] - # Output only. Provides details to errors and issues encountered while - # processing the subtask. Presence of error details does not mean that the - # subtask failed. - # @!attribute [r] resource_error_count - # @return [::Integer] - # Output only. The number or resources with errors. Note: This is not the - # total number of errors as each resource can have more than one error. This - # is used to indicate truncation by having a `resource_error_count` that is - # higher than the size of `resource_error_details`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the subtask was created. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the subtask was last updated. - # @!attribute [r] metrics - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] - # Output only. The metrics for the subtask. - class MigrationSubtask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a migration subtask. - module State - # The state is unspecified. - STATE_UNSPECIFIED = 0 - - # The subtask is ready, i.e. it is ready for execution. - ACTIVE = 1 - - # The subtask is running, i.e. it is assigned to a worker for execution. - RUNNING = 2 - - # The subtask finished successfully. - SUCCEEDED = 3 - - # The subtask finished unsuccessfully. - FAILED = 4 - - # The subtask is paused, i.e., it will not be scheduled. If it was already - # assigned,it might still finish but no new lease renewals will be granted. - PAUSED = 5 - - # The subtask is pending a dependency. It will be scheduled once its - # dependencies are done. - PENDING_DEPENDENCY = 6 - end - end - - # The migration task result. - # @!attribute [rw] translation_task_result - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationTaskResult] - # Details specific to translation task types. - class MigrationTaskResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Translation specific result details from the migration task. - # @!attribute [rw] translated_literals - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Literal>] - # The list of the translated literals. - # @!attribute [rw] report_log_messages - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::GcsReportLogMessage>] - # The records from the aggregate CSV report for a migration workflow. - # @!attribute [rw] console_uri - # @return [::String] - # The Cloud Console URI for the migration workflow. - class TranslationTaskResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb deleted file mode 100644 index 29dfe6d0ee40..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb +++ /dev/null @@ -1,72 +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 Migration - module V2 - # Provides details for errors and the corresponding resources. - # @!attribute [rw] resource_info - # @return [::Google::Rpc::ResourceInfo] - # Required. Information about the resource where the error is located. - # @!attribute [rw] error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ErrorDetail>] - # Required. The error details for the resource. - # @!attribute [rw] error_count - # @return [::Integer] - # Required. How many errors there are in total for the resource. Truncation - # can be indicated by having an `error_count` that is higher than the size of - # `error_details`. - class ResourceErrorDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides details for errors, e.g. issues that where encountered when - # processing a subtask. - # @!attribute [rw] location - # @return [::Google::Cloud::Bigquery::Migration::V2::ErrorLocation] - # Optional. The exact location within the resource (if applicable). - # @!attribute [rw] error_info - # @return [::Google::Rpc::ErrorInfo] - # Required. Describes the cause of the error with structured detail. - class ErrorDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds information about where the error is located. - # @!attribute [rw] line - # @return [::Integer] - # Optional. If applicable, denotes the line where the error occurred. A zero - # value means that there is no line information. - # @!attribute [rw] column - # @return [::Integer] - # Optional. If applicable, denotes the column where the error occurred. A - # zero value means that there is no columns information. - class ErrorLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb deleted file mode 100644 index 41e34dd60654..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb +++ /dev/null @@ -1,129 +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 Migration - module V2 - # The metrics object for a SubTask. - # @!attribute [rw] metric - # @return [::String] - # Required. The name of the metric. - # - # If the metric is not known by the service yet, it will be auto-created. - # @!attribute [rw] value_type - # @return [::Google::Api::MetricDescriptor::ValueType] - # Required. The value type of the time series. - # @!attribute [rw] metric_kind - # @return [::Google::Api::MetricDescriptor::MetricKind] - # Optional. The metric kind of the time series. - # - # If present, it must be the same as the metric kind of the associated - # metric. If the associated metric's descriptor must be auto-created, then - # this field specifies the metric kind of the new descriptor and must be - # either `GAUGE` (the default) or `CUMULATIVE`. - # @!attribute [rw] points - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Point>] - # Required. The data points of this time series. When listing time series, - # points are returned in reverse time order. - # - # When creating a time series, this field must contain exactly one point and - # the point's type must be the same as the value type of the associated - # metric. If the associated metric's descriptor must be auto-created, then - # the value type of the descriptor is determined by the point's type, which - # must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - class TimeSeries - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single data point in a time series. - # @!attribute [rw] interval - # @return [::Google::Cloud::Bigquery::Migration::V2::TimeInterval] - # The time interval to which the data point applies. For `GAUGE` metrics, - # the start time does not need to be supplied, but if it is supplied, it must - # equal the end time. For `DELTA` metrics, the start and end time should - # specify a non-zero interval, with subsequent points specifying contiguous - # and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - # time should specify a non-zero interval, with subsequent points specifying - # the same start time and increasing end times, until an event resets the - # cumulative value to zero and sets a new start time for the following - # points. - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::Migration::V2::TypedValue] - # The value of the data point. - class Point - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A time interval extending just after a start time through an end time. - # If the start time is the same as the end time, then the interval - # represents a single point in time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The beginning of the time interval. The default value - # for the start time is the end time. The start time must not be - # later than the end time. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. The end of the time interval. - class TimeInterval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single strongly-typed value. - # @!attribute [rw] bool_value - # @return [::Boolean] - # A Boolean value: `true` or `false`. - # - # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int64_value - # @return [::Integer] - # A 64-bit integer. Its range is approximately `+/-9.2x10^18`. - # - # Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_value - # @return [::Float] - # A 64-bit double-precision floating-point number. Its magnitude - # is approximately `+/-10^(+/-300)` and it has 16 significant digits of - # precision. - # - # Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # A variable-length string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] distribution_value - # @return [::Google::Api::Distribution] - # A distribution value. - # - # Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TypedValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb deleted file mode 100644 index d833be3e5b1d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb +++ /dev/null @@ -1,166 +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 Migration - module V2 - # Request to create a migration workflow resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @!attribute [rw] migration_workflow - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # Required. The migration workflow to create. - class CreateMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be retrieved. - class GetMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list previously created migration workflows. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be retrieved. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - class ListMigrationWorkflowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for a `ListMigrationWorkflows` call. - # @!attribute [rw] migration_workflows - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # The migration workflows for the specified project / location. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMigrationWorkflowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - class DeleteMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to start a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - class StartMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a previously created migration subtasks. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to be retrieved. - class GetMigrationSubtaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list previously created migration subtasks. - # @!attribute [rw] parent - # @return [::String] - # Required. The migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to be retrieved. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - class ListMigrationSubtasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for a `ListMigrationSubtasks` call. - # @!attribute [rw] migration_subtasks - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # The migration subtasks for the specified task. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMigrationSubtasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb deleted file mode 100644 index d0c7dde5e35b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb +++ /dev/null @@ -1,389 +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 Migration - module V2 - # The translation config to capture necessary settings for a translation task - # and subtask. - # @!attribute [rw] gcs_source_path - # @return [::String] - # The Cloud Storage path for a directory of files to translate in a task. - # @!attribute [rw] gcs_target_path - # @return [::String] - # The Cloud Storage path to write back the corresponding input files to. - # @!attribute [rw] name_mapping_list - # @return [::Google::Cloud::Bigquery::Migration::V2::ObjectNameMappingList] - # The mapping of objects to their desired output names in list form. - # @!attribute [rw] source_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] - # The dialect of the input files. - # @!attribute [rw] target_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] - # The target dialect for the engine to translate the input to. - # @!attribute [rw] source_env - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnv] - # The default source environment values for the translation. - # @!attribute [rw] request_source - # @return [::String] - # The indicator to show translation request initiator. - # @!attribute [rw] target_types - # @return [::Array<::String>] - # The types of output to generate, e.g. sql, metadata etc. If not specified, - # a default set of targets will be generated. Some additional target types - # may be slower to generate. See the documentation for the set of available - # target types. - class TranslationConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible dialect options for translation. - # @!attribute [rw] bigquery_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::BigQueryDialect] - # The BigQuery dialect - # - # Note: The following fields are mutually exclusive: `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hiveql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::HiveQLDialect] - # The HiveQL dialect - # - # Note: The following fields are mutually exclusive: `hiveql_dialect`, `bigquery_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redshift_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::RedshiftDialect] - # The Redshift dialect - # - # Note: The following fields are mutually exclusive: `redshift_dialect`, `bigquery_dialect`, `hiveql_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] teradata_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect] - # The Teradata dialect - # - # Note: The following fields are mutually exclusive: `teradata_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oracle_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::OracleDialect] - # The Oracle dialect - # - # Note: The following fields are mutually exclusive: `oracle_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sparksql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SparkSQLDialect] - # The SparkSQL dialect - # - # Note: The following fields are mutually exclusive: `sparksql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] snowflake_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SnowflakeDialect] - # The Snowflake dialect - # - # Note: The following fields are mutually exclusive: `snowflake_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] netezza_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::NetezzaDialect] - # The Netezza dialect - # - # Note: The following fields are mutually exclusive: `netezza_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_synapse_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::AzureSynapseDialect] - # The Azure Synapse dialect - # - # Note: The following fields are mutually exclusive: `azure_synapse_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vertica_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::VerticaDialect] - # The Vertica dialect - # - # Note: The following fields are mutually exclusive: `vertica_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sql_server_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SQLServerDialect] - # The SQL Server dialect - # - # Note: The following fields are mutually exclusive: `sql_server_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] postgresql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::PostgresqlDialect] - # The Postgresql dialect - # - # Note: The following fields are mutually exclusive: `postgresql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] presto_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::PrestoDialect] - # The Presto dialect - # - # Note: The following fields are mutually exclusive: `presto_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mysql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::MySQLDialect] - # The MySQL dialect - # - # Note: The following fields are mutually exclusive: `mysql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] db2_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::DB2Dialect] - # DB2 dialect - # - # Note: The following fields are mutually exclusive: `db2_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sqlite_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SQLiteDialect] - # SQLite dialect - # - # Note: The following fields are mutually exclusive: `sqlite_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] greenplum_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::GreenplumDialect] - # Greenplum dialect - # - # Note: The following fields are mutually exclusive: `greenplum_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Dialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for BigQuery. - class BigQueryDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for HiveQL. - class HiveQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Redshift. - class RedshiftDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Teradata. - # @!attribute [rw] mode - # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect::Mode] - # Which Teradata sub-dialect mode the user specifies. - class TeradataDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The sub-dialect options for Teradata. - module Mode - # Unspecified mode. - MODE_UNSPECIFIED = 0 - - # Teradata SQL mode. - SQL = 1 - - # BTEQ mode (which includes SQL). - BTEQ = 2 - end - end - - # The dialect definition for Oracle. - class OracleDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SparkSQL. - class SparkSQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Snowflake. - class SnowflakeDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Netezza. - class NetezzaDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Azure Synapse. - class AzureSynapseDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Vertica. - class VerticaDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SQL Server. - class SQLServerDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Postgresql. - class PostgresqlDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Presto. - class PrestoDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for MySQL. - class MySQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for DB2. - class DB2Dialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SQLite. - class SQLiteDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Greenplum. - class GreenplumDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a map of name mappings using a list of key:value proto messages of - # existing name to desired output name. - # @!attribute [rw] name_map - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ObjectNameMapping>] - # The elements of the object name map. - class ObjectNameMappingList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a key-value pair of NameMappingKey to NameMappingValue to - # represent the mapping of SQL names from the input value to desired output. - # @!attribute [rw] source - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey] - # The name of the object in source that is being mapped. - # @!attribute [rw] target - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingValue] - # The desired target name of the object that is being mapped. - class ObjectNameMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The potential components of a full name mapping that will be mapped - # during translation in the source data warehouse. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey::Type] - # The type of object that is being mapped. - # @!attribute [rw] database - # @return [::String] - # The database name (BigQuery project ID equivalent in the source data - # warehouse). - # @!attribute [rw] schema - # @return [::String] - # The schema name (BigQuery dataset equivalent in the source data warehouse). - # @!attribute [rw] relation - # @return [::String] - # The relation name (BigQuery table or view equivalent in the source data - # warehouse). - # @!attribute [rw] attribute - # @return [::String] - # The attribute name (BigQuery column equivalent in the source data - # warehouse). - class NameMappingKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the object that is being mapped. - module Type - # Unspecified name mapping type. - TYPE_UNSPECIFIED = 0 - - # The object being mapped is a database. - DATABASE = 1 - - # The object being mapped is a schema. - SCHEMA = 2 - - # The object being mapped is a relation. - RELATION = 3 - - # The object being mapped is an attribute. - ATTRIBUTE = 4 - - # The object being mapped is a relation alias. - RELATION_ALIAS = 5 - - # The object being mapped is a an attribute alias. - ATTRIBUTE_ALIAS = 6 - - # The object being mapped is a function. - FUNCTION = 7 - end - end - - # The potential components of a full name mapping that will be mapped - # during translation in the target data warehouse. - # @!attribute [rw] database - # @return [::String] - # The database name (BigQuery project ID equivalent in the target data - # warehouse). - # @!attribute [rw] schema - # @return [::String] - # The schema name (BigQuery dataset equivalent in the target data warehouse). - # @!attribute [rw] relation - # @return [::String] - # The relation name (BigQuery table or view equivalent in the target data - # warehouse). - # @!attribute [rw] attribute - # @return [::String] - # The attribute name (BigQuery column equivalent in the target data - # warehouse). - class NameMappingValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the default source environment values for the translation. - # @!attribute [rw] default_database - # @return [::String] - # The default database name to fully qualify SQL objects when their database - # name is missing. - # @!attribute [rw] schema_search_path - # @return [::Array<::String>] - # The schema search path. When SQL objects are missing schema name, - # translation engine will search through this list to find the value. - # @!attribute [rw] metadata_store_dataset - # @return [::String] - # Optional. Expects a valid BigQuery dataset ID that exists, e.g., - # project-123.metadata_store_123. If specified, translation will search and - # read the required schema information from a metadata store in this dataset. - # If metadata store doesn't exist, translation will parse the metadata file - # and upload the schema info to a temp table in the dataset to speed up - # future translation jobs. - class SourceEnv - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb deleted file mode 100644 index 43810632c46b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb +++ /dev/null @@ -1,191 +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 Migration - module V2 - # The translation details to capture the necessary settings for a translation - # job. - # @!attribute [rw] source_target_mapping - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SourceTargetMapping>] - # The mapping from source to target SQL. - # @!attribute [rw] target_base_uri - # @return [::String] - # The base URI for all writes to persistent storage. - # @!attribute [rw] source_environment - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnvironment] - # The default source environment values for the translation. - # @!attribute [rw] target_return_literals - # @return [::Array<::String>] - # The list of literal targets that will be directly returned to the response. - # Each entry consists of the constructed path, EXCLUDING the base path. Not - # providing a target_base_uri will prevent writing to persistent storage. - # @!attribute [rw] target_types - # @return [::Array<::String>] - # The types of output to generate, e.g. sql, metadata, - # lineage_from_sql_scripts, etc. If not specified, a default set of - # targets will be generated. Some additional target types may be slower to - # generate. See the documentation for the set of available target types. - # @!attribute [rw] suggestion_config - # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionConfig] - # The configuration for the suggestion if requested as a target type. - class TranslationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration for the suggestion if requested as a target type. - # @!attribute [rw] skip_suggestion_steps - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SuggestionStep>] - # The list of suggestion steps to skip. - class SuggestionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Suggestion step to skip. - # @!attribute [rw] suggestion_type - # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::SuggestionType] - # The type of suggestion. - # @!attribute [rw] rewrite_target - # @return [::Google::Cloud::Bigquery::Migration::V2::SuggestionStep::RewriteTarget] - # The rewrite target. - class SuggestionStep - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Suggestion type. - module SuggestionType - # Suggestion type unspecified. - SUGGESTION_TYPE_UNSPECIFIED = 0 - - # Query customization. - QUERY_CUSTOMIZATION = 1 - - # Translation explanation. - TRANSLATION_EXPLANATION = 2 - end - - # The target to apply the suggestion to. - module RewriteTarget - # Rewrite target unspecified. - REWRITE_TARGET_UNSPECIFIED = 0 - - # Source SQL. - SOURCE_SQL = 1 - - # Target SQL. - TARGET_SQL = 2 - end - end - - # Represents one mapping from a source SQL to a target SQL. - # @!attribute [rw] source_spec - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceSpec] - # The source SQL or the path to it. - # @!attribute [rw] target_spec - # @return [::Google::Cloud::Bigquery::Migration::V2::TargetSpec] - # The target SQL or the path for it. - class SourceTargetMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents one path to the location that holds source data. - # @!attribute [rw] base_uri - # @return [::String] - # The base URI for all files to be read in as sources for translation. - # - # Note: The following fields are mutually exclusive: `base_uri`, `literal`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] literal - # @return [::Google::Cloud::Bigquery::Migration::V2::Literal] - # Source literal. - # - # Note: The following fields are mutually exclusive: `literal`, `base_uri`, `gcs_file_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcs_file_path - # @return [::String] - # The path to a single source file in Cloud Storage. - # - # Note: The following fields are mutually exclusive: `gcs_file_path`, `base_uri`, `literal`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The optional field to specify the encoding of the sql bytes. - class SourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents one path to the location that holds target data. - # @!attribute [rw] relative_path - # @return [::String] - # The relative path for the target data. Given source file - # `base_uri/input/sql`, the output would be - # `target_base_uri/sql/relative_path/input.sql`. - class TargetSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Literal data. - # @!attribute [rw] literal_string - # @return [::String] - # Literal string data. - # - # Note: The following fields are mutually exclusive: `literal_string`, `literal_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] literal_bytes - # @return [::String] - # Literal byte data. - # - # Note: The following fields are mutually exclusive: `literal_bytes`, `literal_string`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] relative_path - # @return [::String] - # Required. The identifier of the literal entry. - class Literal - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the default source environment values for the translation. - # @!attribute [rw] default_database - # @return [::String] - # The default database name to fully qualify SQL objects when their database - # name is missing. - # @!attribute [rw] schema_search_path - # @return [::Array<::String>] - # The schema search path. When SQL objects are missing schema name, - # translation engine will search through this list to find the value. - # @!attribute [rw] metadata_store_dataset - # @return [::String] - # Optional. Expects a validQ BigQuery dataset ID that exists, e.g., - # project-123.metadata_store_123. If specified, translation will search and - # read the required schema information from a metadata store in this dataset. - # If metadata store doesn't exist, translation will parse the metadata file - # and upload the schema info to a temp table in the dataset to speed up - # future translation jobs. - class SourceEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb deleted file mode 100644 index ba08b1dfb393..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.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! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # Details about a record. - # @!attribute [rw] severity - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationReportRecord::Severity] - # Severity of the translation record. - # @!attribute [rw] script_line - # @return [::Integer] - # Specifies the row from the source text where the error occurred (0 based). - # Example: 2 - # @!attribute [rw] script_column - # @return [::Integer] - # Specifies the column from the source texts where the error occurred. (0 - # based) example: 6 - # @!attribute [rw] category - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] message - # @return [::String] - # Detailed message of the record. - class TranslationReportRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity type of the record. - module Severity - # SeverityType not specified. - SEVERITY_UNSPECIFIED = 0 - - # INFO type. - INFO = 1 - - # WARNING type. The translated query may still provide useful information - # if all the report records are WARNING. - WARNING = 2 - - # ERROR type. Translation failed. - ERROR = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb deleted file mode 100644 index 13d55b41ed54..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb +++ /dev/null @@ -1,69 +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 Migration - module V2 - # A record in the aggregate CSV report for a migration workflow - # @!attribute [rw] severity - # @return [::String] - # Severity of the translation record. - # @!attribute [rw] category - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] file_path - # @return [::String] - # The file path in which the error occurred - # @!attribute [rw] filename - # @return [::String] - # The file name in which the error occurred - # @!attribute [rw] source_script_line - # @return [::Integer] - # Specifies the row from the source text where the error occurred (0 based, - # -1 for messages without line location). Example: 2 - # @!attribute [rw] source_script_column - # @return [::Integer] - # Specifies the column from the source texts where the error occurred. (0 - # based, -1 for messages without column location) example: 6 - # @!attribute [rw] message - # @return [::String] - # Detailed message of the record. - # @!attribute [rw] script_context - # @return [::String] - # The script context (obfuscated) in which the error occurred - # @!attribute [rw] action - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] effect - # @return [::String] - # Effect of the error/warning. Example: COMPATIBILITY - # @!attribute [rw] object_name - # @return [::String] - # Name of the affected object in the log message. - class GcsReportLogMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +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 generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +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 - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +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 from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb deleted file mode 100644 index 507d2b54094a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb +++ /dev/null @@ -1,420 +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 - # Describes the cause of the error with structured details. - # - # Example of an error when contacting the "pubsub.googleapis.com" API when it - # is not enabled: - # - # { "reason": "API_DISABLED" - # "domain": "googleapis.com" - # "metadata": { - # "resource": "projects/123", - # "service": "pubsub.googleapis.com" - # } - # } - # - # This response indicates that the pubsub.googleapis.com API is not enabled. - # - # Example of an error that is returned when attempting to create a Spanner - # instance in a region that is out of stock: - # - # { "reason": "STOCKOUT" - # "domain": "spanner.googleapis.com", - # "metadata": { - # "availableRegions": "us-central1,us-east2" - # } - # } - # @!attribute [rw] reason - # @return [::String] - # The reason of the error. This is a constant value that identifies the - # proximate cause of the error. Error reasons are unique within a particular - # domain of errors. This should be at most 63 characters and match a - # regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents - # UPPER_SNAKE_CASE. - # @!attribute [rw] domain - # @return [::String] - # The logical grouping to which the "reason" belongs. The error domain - # is typically the registered service name of the tool or product that - # generates the error. Example: "pubsub.googleapis.com". If the error is - # generated by some common infrastructure, the error domain must be a - # globally unique value that identifies the infrastructure. For Google API - # infrastructure, the error domain is "googleapis.com". - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional structured details about this error. - # - # Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should - # ideally be lowerCamelCase. Also, they must be limited to 64 characters in - # length. When identifying the current value of an exceeded limit, the units - # should be contained in the key, not the value. For example, rather than - # `{"instanceLimit": "100/request"}`, should be returned as, - # `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of - # instances that can be created in a single (batch) request. - class ErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes when the clients can retry a failed request. Clients could ignore - # the recommendation here or retry when this information is missing from error - # responses. - # - # It's always recommended that clients should use exponential backoff when - # retrying. - # - # Clients should wait until `retry_delay` amount of time has passed since - # receiving the error response before retrying. If retrying requests also - # fail, clients should use an exponential backoff scheme to gradually increase - # the delay between retries based on `retry_delay`, until either a maximum - # number of retries have been reached or a maximum retry delay cap has been - # reached. - # @!attribute [rw] retry_delay - # @return [::Google::Protobuf::Duration] - # Clients should wait at least this long between retrying the same request. - class RetryInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes additional debugging info. - # @!attribute [rw] stack_entries - # @return [::Array<::String>] - # The stack trace entries indicating where the error occurred. - # @!attribute [rw] detail - # @return [::String] - # Additional debugging information provided by the server. - class DebugInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes how a quota check failed. - # - # For example if a daily limit was exceeded for the calling project, - # a service could respond with a QuotaFailure detail containing the project - # id and the description of the quota limit that was exceeded. If the - # calling project hasn't enabled the service in the developer console, then - # a service could respond with the project id and set `service_disabled` - # to true. - # - # Also see RetryInfo and Help types for other details about handling a - # quota failure. - # @!attribute [rw] violations - # @return [::Array<::Google::Rpc::QuotaFailure::Violation>] - # Describes all quota violations. - class QuotaFailure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single quota violation. For example, a - # daily quota or a custom quota that was exceeded. - # @!attribute [rw] subject - # @return [::String] - # The subject on which the quota check failed. - # For example, "clientip:" or "project:". - # @!attribute [rw] description - # @return [::String] - # A description of how the quota check failed. Clients can use this - # description to find more about the quota configuration in the service's - # public documentation, or find the relevant quota limit to adjust through - # developer console. - # - # For example: "Service disabled" or "Daily Limit for read operations - # exceeded". - # @!attribute [rw] api_service - # @return [::String] - # The API Service from which the `QuotaFailure.Violation` orginates. In - # some cases, Quota issues originate from an API Service other than the one - # that was called. In other words, a dependency of the called API Service - # could be the cause of the `QuotaFailure`, and this field would have the - # dependency API service name. - # - # For example, if the called API is Kubernetes Engine API - # (container.googleapis.com), and a quota violation occurs in the - # Kubernetes Engine API itself, this field would be - # "container.googleapis.com". On the other hand, if the quota violation - # occurs when the Kubernetes Engine API creates VMs in the Compute Engine - # API (compute.googleapis.com), this field would be - # "compute.googleapis.com". - # @!attribute [rw] quota_metric - # @return [::String] - # The metric of the violated quota. A quota metric is a named counter to - # measure usage, such as API requests or CPUs. When an activity occurs in a - # service, such as Virtual Machine allocation, one or more quota metrics - # may be affected. - # - # For example, "compute.googleapis.com/cpus_per_vm_family", - # "storage.googleapis.com/internet_egress_bandwidth". - # @!attribute [rw] quota_id - # @return [::String] - # The id of the violated quota. Also know as "limit name", this is the - # unique identifier of a quota in the context of an API service. - # - # For example, "CPUS-PER-VM-FAMILY-per-project-region". - # @!attribute [rw] quota_dimensions - # @return [::Google::Protobuf::Map{::String => ::String}] - # The dimensions of the violated quota. Every non-global quota is enforced - # on a set of dimensions. While quota metric defines what to count, the - # dimensions specify for what aspects the counter should be increased. - # - # For example, the quota "CPUs per region per VM family" enforces a limit - # on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions - # "region" and "vm_family". And if the violation occurred in region - # "us-central1" and for VM family "n1", the quota_dimensions would be, - # - # { - # "region": "us-central1", - # "vm_family": "n1", - # } - # - # When a quota is enforced globally, the quota_dimensions would always be - # empty. - # @!attribute [rw] quota_value - # @return [::Integer] - # The enforced quota value at the time of the `QuotaFailure`. - # - # For example, if the enforced quota value at the time of the - # `QuotaFailure` on the number of CPUs is "10", then the value of this - # field would reflect this quantity. - # @!attribute [rw] future_quota_value - # @return [::Integer] - # The new quota value being rolled out at the time of the violation. At the - # completion of the rollout, this value will be enforced in place of - # quota_value. If no rollout is in progress at the time of the violation, - # this field is not set. - # - # For example, if at the time of the violation a rollout is in progress - # changing the number of CPUs quota from 10 to 20, 20 would be the value of - # this field. - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class QuotaDimensionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Describes what preconditions have failed. - # - # For example, if an RPC failed because it required the Terms of Service to be - # acknowledged, it could list the terms of service violation in the - # PreconditionFailure message. - # @!attribute [rw] violations - # @return [::Array<::Google::Rpc::PreconditionFailure::Violation>] - # Describes all precondition violations. - class PreconditionFailure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single precondition failure. - # @!attribute [rw] type - # @return [::String] - # The type of PreconditionFailure. We recommend using a service-specific - # enum type to define the supported precondition violation subjects. For - # example, "TOS" for "Terms of Service violation". - # @!attribute [rw] subject - # @return [::String] - # The subject, relative to the type, that failed. - # For example, "google.com/cloud" relative to the "TOS" type would indicate - # which terms of service is being referenced. - # @!attribute [rw] description - # @return [::String] - # A description of how the precondition failed. Developers can use this - # description to understand how to fix the failure. - # - # For example: "Terms of service not accepted". - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes violations in a client request. This error type focuses on the - # syntactic aspects of the request. - # @!attribute [rw] field_violations - # @return [::Array<::Google::Rpc::BadRequest::FieldViolation>] - # Describes all violations in a client request. - class BadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single bad request field. - # @!attribute [rw] field - # @return [::String] - # A path that leads to a field in the request body. The value will be a - # sequence of dot-separated identifiers that identify a protocol buffer - # field. - # - # Consider the following: - # - # message CreateContactRequest { - # message EmailAddress { - # enum Type { - # TYPE_UNSPECIFIED = 0; - # HOME = 1; - # WORK = 2; - # } - # - # optional string email = 1; - # repeated EmailType type = 2; - # } - # - # string full_name = 1; - # repeated EmailAddress email_addresses = 2; - # } - # - # In this example, in proto `field` could take one of the following values: - # - # * `full_name` for a violation in the `full_name` value - # * `email_addresses[0].email` for a violation in the `email` field of the - # first `email_addresses` message - # * `email_addresses[2].type[1]` for a violation in the second `type` - # value in the third `email_addresses` message. - # - # In JSON, the same values are represented as: - # - # * `fullName` for a violation in the `fullName` value - # * `emailAddresses[0].email` for a violation in the `email` field of the - # first `emailAddresses` message - # * `emailAddresses[2].type[1]` for a violation in the second `type` - # value in the third `emailAddresses` message. - # @!attribute [rw] description - # @return [::String] - # A description of why the request element is bad. - # @!attribute [rw] reason - # @return [::String] - # The reason of the field-level error. This is a constant value that - # identifies the proximate cause of the field-level error. It should - # uniquely identify the type of the FieldViolation within the scope of the - # google.rpc.ErrorInfo.domain. This should be at most 63 - # characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, - # which represents UPPER_SNAKE_CASE. - # @!attribute [rw] localized_message - # @return [::Google::Rpc::LocalizedMessage] - # Provides a localized error message for field-level errors that is safe to - # return to the API consumer. - class FieldViolation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Contains metadata about the request that clients can attach when filing a bug - # or providing other forms of feedback. - # @!attribute [rw] request_id - # @return [::String] - # An opaque string that should only be interpreted by the service generating - # it. For example, it can be used to identify requests in the service's logs. - # @!attribute [rw] serving_data - # @return [::String] - # Any data that was used to serve this request. For example, an encrypted - # stack trace that can be sent back to the service provider for debugging. - class RequestInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the resource that is being accessed. - # @!attribute [rw] resource_type - # @return [::String] - # A name for the type of resource being accessed, e.g. "sql table", - # "cloud storage bucket", "file", "Google calendar"; or the type URL - # of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - # @!attribute [rw] resource_name - # @return [::String] - # The name of the resource being accessed. For example, a shared calendar - # name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - # error is - # [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - # @!attribute [rw] owner - # @return [::String] - # The owner of the resource (optional). - # For example, "user:" or "project:". - # @!attribute [rw] description - # @return [::String] - # Describes what error is encountered when accessing this resource. - # For example, updating a cloud project may require the `writer` permission - # on the developer console project. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides links to documentation or for performing an out of band action. - # - # For example, if a quota check failed with an error indicating the calling - # project hasn't enabled the accessed service, this can contain a URL pointing - # directly to the right place in the developer console to flip the bit. - # @!attribute [rw] links - # @return [::Array<::Google::Rpc::Help::Link>] - # URL(s) pointing to additional information on handling the current error. - class Help - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a URL link. - # @!attribute [rw] description - # @return [::String] - # Describes what the link offers. - # @!attribute [rw] url - # @return [::String] - # The URL of the link. - class Link - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Provides a localized error message that is safe to return to the user - # which can be attached to an RPC error. - # @!attribute [rw] locale - # @return [::String] - # The locale used following the specification defined at - # https://www.rfc-editor.org/rfc/bcp/bcp47.txt. - # Examples are: "en-US", "fr-CH", "es-MX" - # @!attribute [rw] message - # @return [::String] - # The localized error message in the above locale. - class LocalizedMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile deleted file mode 100644 index 4d1b3eac9aa1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-migration-v2", path: "../" -else - gem "google-cloud-bigquery-migration-v2" -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-migration-v2/snippets/migration_service/create_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb deleted file mode 100644 index eb3b21d627fc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the create_migration_workflow call in the MigrationService 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::Migration::V2::MigrationService::Client#create_migration_workflow. -# -def create_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - - # Call the create_migration_workflow method. - result = client.create_migration_workflow request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb deleted file mode 100644 index add86a0f96f7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the delete_migration_workflow call in the MigrationService 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::Migration::V2::MigrationService::Client#delete_migration_workflow. -# -def delete_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - - # Call the delete_migration_workflow method. - result = client.delete_migration_workflow request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb deleted file mode 100644 index 1e668aecb17b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.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 bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the get_migration_subtask call in the MigrationService 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::Migration::V2::MigrationService::Client#get_migration_subtask. -# -def get_migration_subtask - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - - # Call the get_migration_subtask method. - result = client.get_migration_subtask request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb deleted file mode 100644 index 835a5af7a227..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the get_migration_workflow call in the MigrationService 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::Migration::V2::MigrationService::Client#get_migration_workflow. -# -def get_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - - # Call the get_migration_workflow method. - result = client.get_migration_workflow request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb deleted file mode 100644 index b526522af82b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb +++ /dev/null @@ -1,51 +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 bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the list_migration_subtasks call in the MigrationService 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::Migration::V2::MigrationService::Client#list_migration_subtasks. -# -def list_migration_subtasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - - # Call the list_migration_subtasks method. - result = client.list_migration_subtasks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - p item - end -end -# [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb deleted file mode 100644 index acc8872c9867..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb +++ /dev/null @@ -1,51 +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 bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the list_migration_workflows call in the MigrationService 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::Migration::V2::MigrationService::Client#list_migration_workflows. -# -def list_migration_workflows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - - # Call the list_migration_workflows method. - result = client.list_migration_workflows request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - p item - end -end -# [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb deleted file mode 100644 index db1b4071ef4d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the start_migration_workflow call in the MigrationService 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::Migration::V2::MigrationService::Client#start_migration_workflow. -# -def start_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - - # Call the start_migration_workflow method. - result = client.start_migration_workflow request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json deleted file mode 100644 index a72510c3fe90..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-migration-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.migration.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync", - "title": "Snippet for the create_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow.", - "file": "migration_service/create_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "CreateMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync", - "title": "Snippet for the get_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow.", - "file": "migration_service/get_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "GetMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync", - "title": "Snippet for the list_migration_workflows call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows.", - "file": "migration_service/list_migration_workflows.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_migration_workflows", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "ListMigrationWorkflows", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync", - "title": "Snippet for the delete_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow.", - "file": "migration_service/delete_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "DeleteMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync", - "title": "Snippet for the start_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow.", - "file": "migration_service/start_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "StartMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync", - "title": "Snippet for the get_migration_subtask call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask.", - "file": "migration_service/get_migration_subtask.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_migration_subtask", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "GetMigrationSubtask", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync", - "title": "Snippet for the list_migration_subtasks call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks.", - "file": "migration_service/list_migration_subtasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_migration_subtasks", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "ListMigrationSubtasks", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb deleted file mode 100644 index 930bdb76bea3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb +++ /dev/null @@ -1,79 +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/migration/v2/migration_service" - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_location_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::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_migration_subtask_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::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.migration_subtask_path project: "value0", location: "value1", workflow: "value2", subtask: "value3" - assert_equal "projects/value0/locations/value1/workflows/value2/subtasks/value3", path - end - end - - def test_migration_workflow_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::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.migration_workflow_path project: "value0", location: "value1", workflow: "value2" - assert_equal "projects/value0/locations/value1/workflows/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb deleted file mode 100644 index 80f02da8615f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb +++ /dev/null @@ -1,487 +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/rest" -require "google/cloud/bigquery/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service/rest" - - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - 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_migration_workflow - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - migration_workflow = {} - - create_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_create_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_migration_workflow_client_stub.call_count - end - end - end - - def test_get_migration_workflow - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_migration_workflow({ name: name, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_migration_workflow name: name, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_migration_workflow({ name: name, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_migration_workflow_client_stub.call_count - end - end - end - - def test_list_migration_workflows - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_mask = {} - page_size = 42 - page_token = "hello world" - - list_migration_workflows_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_workflows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_migration_workflows_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_migration_workflows_client_stub.call_count - end - end - end - - def test_delete_migration_workflow - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_delete_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_migration_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_migration_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_migration_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_migration_workflow_client_stub.call_count - end - end - end - - def test_start_migration_workflow - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_migration_workflow_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_start_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_migration_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_migration_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_migration_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_migration_workflow_client_stub.call_count - end - end - end - - def test_get_migration_subtask - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_migration_subtask_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_subtask_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_migration_subtask_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_migration_subtask({ name: name, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_migration_subtask name: name, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_migration_subtask({ name: name, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_migration_subtask_client_stub.call_count - end - end - end - - def test_list_migration_subtasks - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_mask = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_migration_subtasks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_subtasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_migration_subtasks_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_migration_subtasks parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_migration_subtasks_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb deleted file mode 100644 index 6e5729ddc0c6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb +++ /dev/null @@ -1,540 +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/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service" - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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" - migration_workflow = {} - - create_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow), request["migration_workflow"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_migration_workflow_client_stub.call_rpc_count - end - end - - def test_get_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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" - read_mask = {} - - get_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_migration_workflow({ name: name, read_mask: read_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_migration_workflow name: name, read_mask: read_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_migration_workflow({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_migration_workflow_client_stub.call_rpc_count - end - end - - def test_list_migration_workflows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.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_mask = {} - page_size = 42 - page_token = "hello world" - - list_migration_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_migration_workflows, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_migration_workflows_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_migration_workflows_client_stub.call_rpc_count - end - end - - def test_delete_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.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" - - delete_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_migration_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_migration_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_migration_workflow({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.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, delete_migration_workflow_client_stub.call_rpc_count - end - end - - def test_start_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.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" - - start_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_migration_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_migration_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_migration_workflow({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.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, start_migration_workflow_client_stub.call_rpc_count - end - end - - def test_get_migration_subtask - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.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" - read_mask = {} - - get_migration_subtask_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_migration_subtask, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_migration_subtask_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_migration_subtask({ name: name, read_mask: read_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_migration_subtask name: name, read_mask: read_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_migration_subtask({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_migration_subtask_client_stub.call_rpc_count - end - end - - def test_list_migration_subtasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.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_mask = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_migration_subtasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_migration_subtasks, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_migration_subtasks_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_migration_subtasks parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_migration_subtasks({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_migration_subtasks_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::Migration::V2::MigrationService::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::Migration::V2::MigrationService::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::Migration::V2::MigrationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb +++ /dev/null @@ -1,26 +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 "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"